【发布时间】:2015-07-10 00:28:07
【问题描述】:
我正在尝试使用 nodemailer 自动发送电子邮件。问题是我无法使用附件。这是一个示例脚本
var mailOptions = {
from: 'apples@gmail.com', // sender address
to: newClient.a22, // list of receivers
cc: managerEmail, // list of receivers
bcc: financeEmail, // list of receivers
subject: newClient.a4 + ' |' + monthofService +' | Revision ID: '+revisionId, // Subject line
html: printoutfile.replace(/(\n)/g, '<br>'),
attachments : [ { // utf-8 string as an attachment
fileName: 'check.txt',
contents: 'checking that some attachments work...'
}]
};
除附件部分外,一切正常。甚至是邮件程序的文件名
任何帮助将不胜感激,谢谢
【问题讨论】:
标签: javascript node.js nodemailer