1.多多參考官網的email引數文章https://github.com/andris9/nodemailer-smtp-transport#usage
2.傳送附件的時候可以參考這個地址:
http://blog.fens.me/nodejs-email-nodemailer/
一個除錯成功的例子:
var transporter = nodemailer.createTransport({ host: 'smtp.XXXX-inc.com', secure: true, port: 465, name: 'XXX.yyy', auth: { user: 'XXX.XXX@taobao.com', pass: 'XXXXXXX' }, connectionTimeout: 10 * 1000, greetingTimeout: 10 * 1000, socketTimeout: 10 * 1000 });