您还需要
sender将电子邮件标题中的属性设置为最有可能的发件人地址。
使用NodeMailer进行node.js项目时,我遇到了同样的问题。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不在乎的地方。
尝试将
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.comFrom: Persons Name <emailname@example.com>
使
Sender等于
Sender: Persons Name <emailname@example.com>



