我刚刚注意到,使用 mail() 函数从我的主机发送的电子邮件也以标头形式发送内部数据。
例如,这是我在Gmail中找到的(通过单击显示原始内容),
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - abc.hostname.com
X-AntiAbuse: Original Domain - domainname.com
X-AntiAbuse: Sender Address Domain - abc.hostname.com
X-BWhitelist: no
X-Source: /usr/bin/php
X-Source-Args: /usr/bin/php /home/michael/mail/script.php
X-Source-Dir: example.com:/michael/mail
X-Source-Sender:
X-Source-Auth: michael
X-Email-Count: 0
X-Source-Cap: ZsiufdyrnciuyixcioobQ==
然后如何从发送任何电子邮件标题中删除?
你不能对它做太多事情,因为标题是在邮件发出时添加的。只要没有真正的理由不想要这些额外的标头,您就必须忍受它。