{"id":26154380,"url":"https://github.com/rcdmk/node-mail","last_synced_at":"2026-04-08T16:31:42.655Z","repository":{"id":41776195,"uuid":"199895836","full_name":"rcdmk/node-mail","owner":"rcdmk","description":"Node.js + Express API for sending e-mail with provider fallback support","archived":false,"fork":false,"pushed_at":"2025-10-06T20:58:14.000Z","size":253,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T22:34:01.057Z","etag":null,"topics":["chai-as-promised","express-js","javascript","mocha-tests","node-js"],"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/rcdmk.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,"zenodo":null}},"created_at":"2019-07-31T16:54:07.000Z","updated_at":"2025-10-06T20:58:17.000Z","dependencies_parsed_at":"2025-03-11T08:30:58.533Z","dependency_job_id":"2809516d-8918-421f-8293-d96924a64abf","html_url":"https://github.com/rcdmk/node-mail","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rcdmk/node-mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcdmk%2Fnode-mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcdmk%2Fnode-mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcdmk%2Fnode-mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcdmk%2Fnode-mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcdmk","download_url":"https://codeload.github.com/rcdmk/node-mail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcdmk%2Fnode-mail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31564862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["chai-as-promised","express-js","javascript","mocha-tests","node-js"],"created_at":"2025-03-11T08:29:25.585Z","updated_at":"2026-04-08T16:31:42.626Z","avatar_url":"https://github.com/rcdmk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-mail\n\nThis is a simple application that lets the user send e-mails through 3rd-party services using a fallback strategy when some of them fail.\n\n## Table of contents\n\n- [node-mail](#node-mail)\n  - [Table of contents](#table-of-contents)\n  - [Dependencies](#dependencies)\n  - [Tests](#tests)\n  - [Running](#running)\n  - [Configuration](#configuration)\n  - [Routes](#routes)\n    - [POST /v1/messages](#post-v1messages)\n      - [Request](#request)\n      - [Responses](#responses)\n  - [TODO](#todo)\n\n## Dependencies\n\n- Node.js v10+\n- NPM 6.9+ or Yarn 1.17+\n\nOther dependencies are listed in `package.json` file and can be downloaded with **NPM** or **Yarn** from the repository root with:\n\n```sh\nyarn install\n# or\nnpm install\n```\n\n## Tests\n\nThis project has a test suite that covers the main logic and can be executed with:\n\n```sh\nyarn test\n# or\nnpm test\n```\n\n## Running\n\nTo run this application, execute the following:\n\n```sh\nyarn start\n# or\nnpm start\n```\n\nTo run this on Docker, execute the following:\n\n```sh\n# build docker image (first time only)\ndocker build -t node-mail:latest .\n\n# run container\ndocker run -p 3000:3000 node-mail:latest\n```\n\n## Configuration\n\nConfiguration is stored in the config.json file, inside config module and some of its values can be overridden by environment variables:\n\n|       # | Parameter | Type    | Description                                      | Env Var Override |\n| ------: | :-------- | :------ | :----------------------------------------------- | :--------------- |\n|       1 | server    | object  | Server config section                            |                  |\n|     1.1 | port      | integer | Server port to listen to                         | PORT             |\n|       2 | providers | object  | Providers config section                         |                  |\n|     2.1 | email     | object  | E-mail providers config                          |                  |\n|   2.1.1 | mailgun   | object  | Mailgun e-mail provider config                   |                  |\n| 2.1.1.1 | enabled   | boolean | Flag to enable provider                          |                  |\n| 2.1.1.2 | apiKey    | string  | Mailgun API key                                  | MAILGUN_API_KEY  |\n| 2.1.1.3 | domain    | string  | Domain configured in Mailgun                     |                  |\n| 2.1.1.4 | sender    | string  | Sender address for Mailgun (must be from domain) |                  |\n|   2.1.2 | sendgrid  | object  | SendGrid e-mail provider config                  |                  |\n| 2.1.2.1 | enabled   | boolean | Flag to enable provider                          |                  |\n| 2.1.2.2 | apiKey    | string  | SendGrid API key                                 | SENDGRID_API_KEY |\n| 2.1.2.3 | sender    | string  | Sender address for  SendGrid                     |                  |\n\n\u003e **Notice:** Besides this project may store credentials in plain text in the config file, for production use it is recommended to use environment variable overrides or a configration service, as AWS SSM parameter store, to store the application secrets.\n\n## Routes\n\n### POST /v1/messages\n\nThis route enables sending e-mail messages through one of the available providers.\n\n#### Request\n\n```json\n{\n  \"to\": [\"some@email.com\"],\n  \"cc\": [\"copy@email.com\"],\n  \"bcc\": [\"occult@email.com\"],\n  \"subject\": \"Test e-mail subject\",\n  \"text\": \"My test e-email message\"\n}\n```\n\n|    # | Property | Type         | Required | Description                                   | Default |\n| ---: | :------- | :----------- | :------- | :-------------------------------------------- | :------ |\n|    1 | to       | string array | required | Main message recipients                       | empty   |\n|    2 | cc       | string array | optional | Secondary message recipients (Carbon Copy)    | empty   |\n|    3 | bcc      | string array | optional | Hidden message recipients (Blind Carbon Copy) | empty   |\n|    4 | subject  | string       | required | Message subject                               | empty   |\n|    5 | text     | string       | required | Message text body                             | empty   |\n\n#### Responses\n\n**200:** Success\n\n```json\n{\n  \"provider\": \"provider name\"\n}\n```\n\n**422:** Unprocessable Entity - Validation error\n\n```json\n{\n  \"message\": \"To must be provided\"\n}\n```\n\n**503:** Service Unavailable - Provider and dependency errors\n\n```json\n{\n  \"name\": \"InternalError\",\n  \"message\": \"Some provider error\"\n}\n```\n\n## TODO\n\n- [X] Add route documentation\n- [X] Add configuration modules\n- [X] Add app logger\n- [X] Add graceful shutdown\n- [ ] Add validation middleware to controllers\n- [X] Add Dockerfile\n- [ ] Add tests for providers\n- [ ] Add tests for routes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcdmk%2Fnode-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcdmk%2Fnode-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcdmk%2Fnode-mail/lists"}