{"id":21961881,"url":"https://github.com/trapcodeio/api2mailer-server","last_synced_at":"2026-05-04T14:35:06.093Z","repository":{"id":98362947,"uuid":"340294342","full_name":"trapcodeio/api2mailer-server","owner":"trapcodeio","description":"Api 2 Mailer Server","archived":false,"fork":false,"pushed_at":"2021-02-19T16:05:44.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T08:56:44.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trapcodeio.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-19T07:43:52.000Z","updated_at":"2023-01-14T13:05:28.000Z","dependencies_parsed_at":"2023-07-10T14:32:02.700Z","dependency_job_id":null,"html_url":"https://github.com/trapcodeio/api2mailer-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trapcodeio/api2mailer-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fapi2mailer-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fapi2mailer-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fapi2mailer-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fapi2mailer-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapcodeio","download_url":"https://codeload.github.com/trapcodeio/api2mailer-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapcodeio%2Fapi2mailer-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32611959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T10:19:30.309Z","updated_at":"2026-05-04T14:35:06.048Z","avatar_url":"https://github.com/trapcodeio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Api2Mailer\n\nThis package enables you to test remote `smtp/mailer` functionality from localhost without changing nodemailer's Api.\n\n## What is included?\n\n- A web server. (This Repo)\n- An importable package. [api2mailer](https://npmjs.com/package/api2mailer)\n\n### Web Server\n\nThis webserver should be hosted on the same server your main project is using.\n\nIt takes in nodemailer's `sendMail` data via post request and sends the mail on the server.\n\n#### Hosting the server.\n\n- clone this repo\n- run `npm install` or `yarn install`\n- run `node api2mailer cli @makeConfig` (Creates env.json)\n\nEnv.json Example:\n\n```json\n{\n  \"port\": 2222,\n  \"transporters\": {\n    \"default\": {\n      \"host\": \"smtp.mailtrap.io\",\n      \"port\": 2525,\n      \"auth\": {\n        \"user\": \"\",\n        \"pass\": \"\"\n      }\n    }\n  }\n}\n```\n\n#### Start Server\n\n```shell\nnode api2mailer\n# OR using pm2\npm2 start api2mailer.js\n```\n\nThis will start a server at `http://localhost:2222` or using your desired port.\n\n### Sending Mail to Server\n\n```js\n// Example of how you send mail using `nodemailer`\nconst nodemailer = require('nodemailer')\nconst transporter = nodemailer.createTransport({/* Transporter Settings */})\nawait transporter.sendMail({/* Mail Options */});\n\n// Example of how you send mail using `api2mailer`\nconst nodemailer = require('api2mailer')\nconst transporter = nodemailer.createTransport({/* Transporter Settings */})\nawait transporter.sendMail({/* Mail Options */});\n```\n\nThe difference between both is: `api2mailer` proxies your data to your `api2mailer-server` endpoint which then sends\nyour mail on the remote server.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fapi2mailer-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapcodeio%2Fapi2mailer-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapcodeio%2Fapi2mailer-server/lists"}