您需要将邮箱标题中的sender
属性设置为发件人地址.
对node.js项目使用NodeMailer时,我也遇到了同样的问题.Gmail和Thunderbird会很好地显示发件人地址,但Outlook会将发件人地址显示为
emailname=example.com@mail.example.com on behalf of emailname@example.com
当我查看完整的邮箱报头时,我发现报头中的sender:
是emailname=example.com@mail.example.com
,from:
是emailname@example.com
我们一开始查看了SPF和DKIM记录,认为这是一个问题,但它们都很好,在邮箱标题中甚至显示SPF和DKIM都通过了,所以后来我注意到发件人标题与From不同,Outlook注意到Gmail和Thunderbird不太关心的地方.
try 将sender
标头设置为from
值.
以下是为匹配上述示例而编辑的其中一个错误邮箱头的部分示例
Received-SPF: pass (google.com....
Authentication-Results: mx.google.com;
dkim=pass header.i=@mail.example.com;
spf=pass (google.com.....
Sender: emailname=example.com@mail.example.com
From: Persons Name <emailname@example.com>
使Sender
等于Sender: Persons Name <emailname@example.com>