@longnc/themartec-smtpapi
v1.0.0
Published
Build SendGrid X-SMTPAPI headers in nodejs. And this version for upgrade some packages to latest and fix security
Downloads
126
Maintainers
Readme
This node module allows you to quickly and more easily generate SendGrid X-SMTPAPI headers.
Announcements
All updates to this module are documented in our CHANGELOG.
Table of Contents
Installation
Prerequisites
- Node.js version 4, 5, 6, 7, 8, 10, 12, 14, or 16
- The SendGrid service, starting at the free level
Environment Variables
Update your environment with your SendGrid credentials. (if you will be sending via nodemailer or other SMTP transport)
echo "export SENDGRID_USERNAME='YOUR_USERNAME'" > sendgrid.env
echo "export SENDGRID_PASSWORD='YOUR_PASSWORD'" >> sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env
The following recommended installation requires npm. If you are unfamiliar with npm, see the npm docs. Npm comes installed with Node.js since node version 0.8.x, therefore, you likely already have it.
Install smtpapi-nodejs and its dependencies:
npm install @longnc/themartec-smtpapi
Dependencies
- Please see package.json
Quick Start
var smtpapi = require("@longnc/themartec-smtpapi");
var header = new smtpapi();
header.addTo("[email protected]");
header.setUniqueArgs({ cow: "chicken" });
console.log(header.jsonString());
Usage
How to Contribute
We encourage contribution to our projects, please see our CONTRIBUTING guide for details.
Quick links:
About
smtpapi-nodejs is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-nodejs are trademarks of Twilio SendGrid, Inc.
Support
If you need help with SendGrid, please check the Twilio SendGrid Support Help Center.