使用message.sendのmail.send unsteadとドメインを追加: 'gmail.com'(送信するために渡されたオブジェクトへの):
var mail = require('waf-mail/mail');
var message = new mail.Mail();
message.subject = "Here the subject of the email";
message.from = "emailadres of the sender";
message.to = 'theEmailadres';
message.setBodyAsHTML("Here the HTML content of the email");
mail.send({
address: 'smtp.gmail.com',
port: 465,
isSSL: true,
username: 'username',
password: 'password',
domain: 'gmail.com'
}, message);
それは私のために完璧に動作、送信者のGmailアカウントの設定で「セキュアでないアプリのアクセスを許可する」を有効にすると、Googleが接続の試行をブロックする可能性があることに注意してください。 Allow less secure apps to access accounts