关于附件得问题,会报错,应该怎么写,可以获得附件
错误内容:
部分代码如下
let info = await transporter.sendMail({
from: "1755143168@qq.com",//必须和auth.user相同,否则会报553错误
subject: '佩奇晚上好', //主题
to: '1649783672@qq.com',// 收件人邮箱
text:JSON.stringify(arr,null," \n "), //发送给邮箱的内容
attachments:[
{
filename:'测试3',
path:'/user_file/0.9279870790533147.doc'
},
{
filename:'测试3',
content:'https://6361-campusprinting-4guaey7l34880aa5-1303184703.tcb.qcloud.la/icon/3.png?sign=160dd87f0724d886b142b8b747654c00&t=1602768635'
}
]
});
附件里面的path必须是可以正常访问的文件地址,log已经提示了路径下的doc文件不存在。