node-sap-mailer
v0.3.1
Published
SAP mailer
Downloads
5
Keywords
Readme
node-sap-mailer
This service gives the ability to easily send emails. This service is based on Nodemailer node package.
###Nodemailer transport options
//./config.js
module.exports = {
host: "mail.example.com",
port: 25,
debug: true,
tls: {
rejectUnauthorized: false
}
};
How to use Mailer service in module
//./config.js
var Mailer = require('norman-common-server').Mailer;
Mailer.sender = '[email protected]';
mailer.send(mailOptions, function onError(error) {
console.log('Error', error);
}, function onSuccess(info) {
console.log('Success', info);
});
mailOptions:
// setup an e-mail
var mailOptions = {
from: '[email protected]', // sender address
to: '[email protected], [email protected]', // list of receivers
subject: 'Hello', // Subject line
text: 'Hello world', // plaintext body
html: '<b>Hello world</b>' // html body
};
For more please see the https://github.com/andris9/Nodemailer example for mailOptions.