Javascript dpd电子邮件/节点电子邮件程序不会附加文件
尝试使用dpd电子邮件发送文件(使用nodeEmailer) 通过nodeEmailer()中的示例 这只是给了我一个大小为0 KB的“附件-1.bin”文件 尝试使用来自NodeEmailer站点的不同帖子示例,但结果相同 使用chrome邮递员Javascript dpd电子邮件/节点电子邮件程序不会附加文件,javascript,node.js,email,nodemailer,deployd,Javascript,Node.js,Email,Nodemailer,Deployd,尝试使用dpd电子邮件发送文件(使用nodeEmailer) 通过nodeEmailer()中的示例 这只是给了我一个大小为0 KB的“附件-1.bin”文件 尝试使用来自NodeEmailer站点的不同帖子示例,但结果相同 使用chrome邮递员 http://localhost:99/email to:"asa@me.me" subject: "test" text: "test" attachments: [
http://localhost:99/email
to:"asa@me.me"
subject: "test"
text: "test"
attachments: [
{filename: "test.tx"', content:"hello world", contentType:"text/plain"}
]
在NodeEmailer中,
附件
是一组附件
对象。不过,在上面的代码片段中,您将附件设置为对象而不是数组
直接取自
附件-附件对象数组
改变
attachments: {
filename: 'text.bin',
content: 'hello world!',
contentType: 'text/plain'
}
至
attachments: [
{
filename: 'text.bin',
content: 'hello world!',
contentType: 'text/plain'
}
]
附件:[{filename:“test.tx”',content:“hello world”,contentType:“text/plain”}]仍然只是给了我附件-1.bin