[英]Node.js Nodemailer does not generate attachment content
我正在尝试使用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...'
}]
};
一切正常,除了附件部分。 甚至邮件的文件名
任何帮助,将不胜感激,谢谢
它的内容不是内容。 在nodemailer wesite http://www.nodemailer.com/上检查示例代码
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',
content: 'checking that some attachments work...'
}]
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.