const mailer = require('nodemailer-promise')
exports.main = async (event, context) => {
let sendEmail = mailer.config({
host: 'smtp.exmail.qq.com', //换成你邮箱的smtp
port: 465,
secure: true, //检查你邮箱的smpt服务器的设置
auth: {
user: 'mailer@mycite.cn', //换成你的邮箱账号和密码
pass: 'Pwd'
}
})
let message = {
from: 'anywords',
to: event.to,
subject: event.subject,
text: event.text,
}
return await sendEmail(message)
}
想请教一下大佬 如何添加本地图片附件 一起随内容发送邮件,我一直报错
error message Hostname/IP doesn't match certificate's altnames: "Host: mail.aplus-ap.com. is not in the cert's altnames: DNS:mail.jumphk3.net