|
5 years ago | |
---|---|---|
.. | ||
.npmignore | 5 years ago | |
.travis.yml | 5 years ago | |
LICENSE | 5 years ago | |
README.md | 5 years ago | |
index.js | 5 years ago | |
package.json | 5 years ago | |
services.json | 5 years ago | |
test.js | 5 years ago |
Returns SMTP configuration for well-known services
Install with npm
npm install nodemailer-wellknown
Require in your script
var wellknown = require('nodemailer-wellknown');
Resolve SMTP settings
var config = wellknown('Gmail');
// { host: 'smtp.gmail.com',
// port: 465,
// secure: true }
Service names are case insensitive
NB! This repo might be updated more often than Nodemailer itself, so in case a wellknown host is not working, check that you have the latest version of nodemailer-wellknown installed in your node_modules. Otherwise the data you try to use might be still missing.
var transporter = nodemailer.createTransport({
service: 'postmark' // <- resolved as 'Postmark' from the wellknown info
auth: {...}
});
MIT