我使用nodemailer发送电子邮件,但我需要定义返回路径。
我在地址from
中定义,replyTo
和returnPath
。
returnPath(Return-Path(是这样写的:<bla@somewhere.com>
但它不起作用。它始终更改电子邮件服务器地址上邮件源代码中的Return-Path
。有什么想法吗?谢谢。
尝试使用信封属性
const mailOptions = {
envelope: {
'from': '<your@return-path.com>',
'to': "detination@email.com"
},
from: "Info <foo@example.com>",
to: "detination@email.com",
subject: "....",
text: "Hello world",
html: "<b>Hello world ✔</b>",
}
sendMail(mailOptions);
不要省略"<>">