我想写一个 csv 文件,然后用 nodemailer 作为附件通过电子邮件发送它。我有这个代码:
const csvWriter = createCsvWriter({
path: 'out.csv',
header: [
{id: 'name', title: 'Name'},
{id: 'desc', title: 'Description'},
{id: 'image', title: 'Image'}
]
});
csvWriter
.writeRecords(allAds)
.then(()=> console.log('The CSV file was written successfully'));
如何将文件作为附件上传到 nodemailer?
慕斯王
相关分类