{"id":23978054,"url":"https://github.com/shiv-source/node-multi-mailer","last_synced_at":"2026-05-09T07:40:11.173Z","repository":{"id":47627421,"uuid":"396093466","full_name":"shiv-source/node-multi-mailer","owner":"shiv-source","description":"A simple node.js module that exposes high-level API of Nodemailer and SendGrid.","archived":false,"fork":false,"pushed_at":"2021-08-23T15:14:43.000Z","size":85,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T19:36:31.155Z","etag":null,"topics":["ejs","ejs-templates","email","emailtemplate","express","html","multimailer","node-multi-mailer","nodemailer","sendgrid"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/node-multi-mailer","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shiv-source.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-14T18:25:14.000Z","updated_at":"2021-08-20T21:59:06.000Z","dependencies_parsed_at":"2022-07-22T12:32:29.609Z","dependency_job_id":null,"html_url":"https://github.com/shiv-source/node-multi-mailer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shiv-source/node-multi-mailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiv-source%2Fnode-multi-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiv-source%2Fnode-multi-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiv-source%2Fnode-multi-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiv-source%2Fnode-multi-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiv-source","download_url":"https://codeload.github.com/shiv-source/node-multi-mailer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiv-source%2Fnode-multi-mailer/sbom","scorecard":{"id":819637,"data":{"date":"2025-08-11","repo":{"name":"github.com/shiv-source/node-multi-mailer","commit":"4e29a30cccdd6df6a17c4eeb702e0609173eb48d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/shiv-source/node-multi-mailer/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/shiv-source/node-multi-mailer/publish.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"27 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-v923-w3x8-wh69","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T15:07:25.951Z","repository_id":47627421,"created_at":"2025-08-23T15:07:25.951Z","updated_at":"2025-08-23T15:07:25.951Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32811656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ejs","ejs-templates","email","emailtemplate","express","html","multimailer","node-multi-mailer","nodemailer","sendgrid"],"created_at":"2025-01-07T08:16:14.196Z","updated_at":"2026-05-09T07:40:11.156Z","avatar_url":"https://github.com/shiv-source.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-multi-mailer\n\n![NPM Version](https://img.shields.io/npm/v/node-multi-mailer.svg?style=flat)\n![NPM Downloads](https://img.shields.io/npm/dm/node-multi-mailer.svg)\n![GitHub release](https://img.shields.io/github/release/shiv-source/node-multi-mailer)\n![License](https://img.shields.io/github/license/shiv-source/node-multi-mailer)\n\nA simple node.js module that exposes high-level API of [Nodemailer](https://www.npmjs.com/package/nodemailer) and [SendGrid](https://www.npmjs.com/package/@sendgrid/mail).\n\n# Installation\n\n## Prerequisites\n\n- Node.js \u003e= 10.0.0\n- A [Twilio SendGrid account](https://sendgrid.com/free?source=sendgrid-nodejs) for sending emails.\n\n## Install Package\n\nThe following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/). Npm comes installed with Node.js since node version 0.8.x, therefore, you likely already have it.\n\n```sh\n\n# With NPM\n\nnpm install --save node-multi-mailer\n\n# With Yarn\n\nyarn add node-multi-mailer\n\n```\n\n### Verify Sender Identity from SendGrid\n\nVerify an email address or domain in the [Sender Authentication tab](https://app.sendgrid.com/settings/sender_auth/senders). Without this, you will receive a `403 Forbidden` response when trying to send mail.\n\n# Examples\n\nIf you want to use an email template, then add an `email` folder in your project root directory and create a `login.ejs` file in the `email` folder. You can use any template name you want.\n\nAdd `attachment` folder in your root directory for sending an email with attachments.\n\n```\nFolder structure with mail template:\n\n    +-- email\n    |   +-- login.ejs\n    +-- attachments\n    |   +-- myImage.png\n    |   +-- resume.pdf\n    |   +-- resume.docx\n    +-- node_modules\n    +-- index.js\n    +-- package.json\n```\n\nIf required, use this `login.ejs` file as an example template.\n\n```html\n\u003c!-- login.ejs --\u003e\n\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003ctitle\u003eNode-Multi-Mailer\u003c/title\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003ch1\u003eHey \u003c%= firstName %\u003e \u003c%= lastName %\u003e, Your OTP is \u003c%= otp %\u003e\u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Implementation with NodeJs and SendGrid\n\n```js\n// Available options inside configuration object\n\nconst multiMailer = require(\"node-multi-mailer\");\n\nconst multiMailer = multiMailer.configuration({\n  senderEmail: \"you@example.com\",\n  senderName: \"your business name\", // Business Name\n  sendGridApiKey: SENDGRID_API_KEY, // SendGrid API Key\n  replyTo: \"me@example.com\", // optional parameter [ default = senderEmail ]\n  templateFolderPath: emailFolder, // optional parameter  [ required for sending templates ]\n  attachmentFolderPath: attachmentFolder, // Optional parameter  [ required for sending attachments]\n});\n```\n\n### A normal plain text email without any attachments\n\n```js\n// index.js\n\nvar multiMailer = require(\"node-multi-mailer\");\n\n// Create a new instance of MultiMailer\nmultiMailer.configuration({\n  senderEmail: \"you@example.com\",\n  senderName: \"your business name\", // Business Name\n  sendGridApiKey: SENDGRID_API_KEY, // SendGrid API Key\n  replyTo: \"me@example.com\", // optional parameter [ default = senderEmail ]\n});\n\nvar RECEIVER_EMAIL = \"developer.shiv2020@gmail.com\";\n\n// To send a plain text email\nmultiMailer.SendGrid.sendTextEmail(\n  RECEIVER_EMAIL,\n  \"Sending email from node-multi-mailer\", // subject\n  \"Thanks for sending email with node-multi-mailer\" // body\n);\n```\n\n### A normal plain text email with attachments\n\n```js\n\n// index.js\n\nvar multiMailer = require(\"node-multi-mailer\");\nvar path = require(\"path\");\n\nvar attachmentFolder = path.join(__dirname, \"attachment\"); // attachment folder path\n\nlet attachments = [\"myImage.png\", \"resume.pdf\", \"resume.docx\"]; // pass list of files you want to send with multiMailer\n\n// Create a new instance of MultiMailer\nmultiMailer.configuration({\n  senderEmail: \"you@example.com\",\n  senderName: \"your business name\", // Business Name\n  sendGridApiKey: SENDGRID_API_KEY, // SendGrid API Key\n  replyTo: \"me@example.com\", // optional parameter [ default = senderEmail ]\n  templateFolderPath: emailFolder, // optional parameter  [ required for sending templates ]\n  attachmentFolderPath: attachmentFolder, // Optional parameter  [ required for sending attachments]\n});\n\nvar RECEIVER_EMAIL = \"developer.shiv2020@gmail.com\";\n\n// To send a plain text email\nmultiMailer.SendGrid.sendTextEmail(\n  RECEIVER_EMAIL,\n  \"Sending email from node-multi-mailer\", // subject\n  \"Thanks for sending email with node-multi-mailer\" // body\n  attachments,\n);\n```\n\n### A template email using EJS without attachments\n\n```js\n// index.js\n\nvar multiMailer = require(\"node-multi-mailer\");\nvar path = require(\"path\");\n\nvar emailFolder = path.join(__dirname, \"email\"); // template folder path\n\n// Create a new instance of MultiMailer\nmultiMailer.configuration({\n  senderEmail: \"test@example.com\",\n  senderName: SENDER_NAME, // Business Name\n  sendGridApiKey: SENDGRID_API_KEY, // SendGrid API Key\n  replyTo: \"test@example.com\",\n  templateFolderPath: emailFolder,\n});\n\nvar RECEIVER_EMAIL = \"developer.shiv2020@gmail.com\";\n\nvar data = {\n  fisrtName: \"Shiv\",\n  lastName: \"Kumar\",\n  otp: \"123456\",\n};\n\n// To send a template email\nmultiMailer.SendGrid.sendEjsTemplateWithData(\n  RECEIVER_EMAIL,\n  \"Sending email from node-multi-mailer\", // subject\n  \"login.ejs\", // template name\n  data // template data\n);\n```\n\n### A template email using EJS with attachments\n\n```js\n// index.js\n\nvar multiMailer = require(\"node-multi-mailer\");\nvar path = require(\"path\");\n\nvar attachmentFolder = path.join(__dirname, \"attachment\"); // attachment folder path\n\nvar emailFolder = path.join(__dirname, \"email\"); // template folder path\n\nlet attachments = [\"myImage.png\", \"resume.pdf\", \"resume.docx\"]; // pass list of files you want to send with multiMailer\n\n// Create a new instance of MultiMailer\nmultiMailer.configuration({\n  senderEmail: \"test@example.com\",\n  senderName: SENDER_NAME, // Business Name\n  sendGridApiKey: SENDGRID_API_KEY, // SendGrid API Key\n  replyTo: \"test@example.com\",\n  templateFolderPath: emailFolder,\n  attachmentFolderPath: attachmentFolder,\n});\n\nvar RECEIVER_EMAIL = \"developer.shiv2020@gmail.com\";\n\nvar data = {\n  fisrtName: \"Shiv\",\n  lastName: \"Kumar\",\n  otp: \"123456\",\n};\n\n// To send a template email\nmultiMailer.SendGrid.sendEjsTemplateWithData(\n  RECEIVER_EMAIL,\n  \"Sending email from node-multi-mailer\", // subject\n  \"login.ejs\", // template name\n  data // template data\n  attachments,\n);\n```\n\n## Implementation with ExpressJs\n\n### A template email using EJS without attachments\n\n```js\n// index.js\n\nvar express = require(\"express\");\nvar multiMailer = require(\"node-multi-mailer\");\nvar path = require(\"path\");\n\nvar attachmentFolder = path.join(__dirname, \"attachment\"); // attachment folder path\n\nvar emailFolder = path.join(__dirname, \"email\"); // template folder path\n\nlet attachments = [\"myImage.png\", \"resume.pdf\", \"resume.docx\"]; // pass list of files you want to send with multiMailer\n\n// Create a new instance of MultiMailer\nmultiMailer.configuration({\n  senderEmail: \"test@example.com\",\n  senderName: SENDER_NAME, // Business Name\n  sendGridApiKey: SENDGRID_API_KEY, // SendGrid API Key\n  replyTo: \"test@example.com\",\n  templateFolderPath: emailFolder,\n  attachmentFolderPath: attachmentFolder,\n});\n\nvar app = express();\n\napp.get(\"/\", async (req, res) =\u003e {\n\n  var RECEIVER_EMAIL = \"developer.shiv2020@gmail.com\";\n\n  var data = {\n    fisrtName: \"Shiv\",\n    lastName: \"Kumar\",\n    otp: \"123456\",\n  };\n\n  // To send a template email\n  await multiMailer.SendGrid.sendEjsTemplateWithData(\n    RECEIVER_EMAIL,\n    \"Sending email from node-multi-mailer\", // subject\n    \"login.ejs\", // template name\n    data // template data\n    attachments,\n  );\n\n  return res.send(\"Email sent\");\n});\n```\n\n# Contributors\n\n\u003ca href = \"https://github.com/shiv-source\"\u003e\n  \u003cimg \n    src = \"https://avatars.githubusercontent.com/u/56552766?v=4\" \n    width=\"100\" \n    height=\"100\"\n    style=\"border-radius: 50%; margin: 5px;\" \n  /\u003e\n\u003c/a\u003e\n\n# License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiv-source%2Fnode-multi-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiv-source%2Fnode-multi-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiv-source%2Fnode-multi-mailer/lists"}