The email address of the sender. All email addresses can be plain 'sender@server.com' or formatted '"Sender Name" sender@server.com'
Comma separated list or an array of recipients email addresses that will appear on the To: field
The email address of the sender. All email addresses can be plain 'sender@server.com' or formatted '"Sender Name" sender@server.com'
Comma separated list or an array of recipients email addresses that will appear on the To: field
The subject of the email
async
params => {
}
var nodemailer = require('nodemailer');
// See the Nodemailer docs for all options:
// https://nodemailer.com/usage/
var transporter = nodemailer.createTransport({
host: params.host,
port: params.port,
secure: params.tls, // use TLS
ignoreTLS: !params.tls,
auth: {
user: params.user,
pass: params.pass
}
});
var mailOptions = {
from: params.from,
to: params.to,
cc: params.cc,
subject: params.subject,
text: (params.text || ''),
html: (params.html || '')
};
var mail = await transporter.sendMail(mailOptions);
console.log('Email sent: ' + mail.messageId);
return mail;