我使用nodemailer发送电子邮件,但是我需要定义Return-Path。
我在地址from
,replyTo
和returnPath
中定义。
ReturnPath(Return-Path)的写法是这样的:<[email protected]>
但是它不起作用。它总是更改电子邮件服务器地址上消息源代码中的Return-Path
。有任何想法吗?谢谢。
尝试使用信封属性
const mailOptions = {
envelope: {
'from': '<[email protected]>',
'to': "[email protected]"
},
from: "Info <[email protected]>",
to: "[email protected]",
subject: "....",
text: "Hello world",
html: "<b>Hello world ✔</b>",
}
sendMail(mailOptions);
不要省略“ <>”