问题描述
我使用 PHP 发送无回复"邮件邮件 功能.问题是当我使用以下发件人"标题时,邮件已发送,但收件箱中未收到:
I'm sending "no-reply" mails using PHP mail function. The problem is that mails were sent, but not receiving in my inbox when I use the following "From" headers:
- 发件人:发件人姓名
- 来自:
[email protected]
- 发件人:发件人姓名
我没有实际的邮件地址 [email protected]
,但我有 [email protected]
.
我认为根据 PHP 文档,所有这些都是正确的格式.
I have no actual mail address [email protected]
, but I have [email protected]
.
I think all of them are the correct formats according to the PHP documentation.
当我尝试 From: [email protected]
时,它确实有效并且我收到了邮件.
我真的很想使用 1 号格式 Form: My Site Name
.它应该工作.有什么想法吗?
When I tried From: [email protected]
, it did work and I received the mail.
I really want to use the No. 1 format Form: My Site Name <[email protected]>
. It should work. Any idea?
我使用 XAMPP 1.6.7 和 PHP 5.2.6 和 MercuryMail.>
I'm using XAMPP 1.6.7 with PHP 5.2.6 and MercuryMail.
推荐答案
由私人邮件服务器和动态 ip 发送的电子邮件被大多数电子邮件提供商拒绝以防止垃圾邮件.您的提供商似乎就是其中之一.
您可以寻找提供 smtp 中继服务器的提供商,但也许那时无法更改发件人"地址.这取决于提供商.
You can take a look for a provider which gives you a smtp-relay server, but maybe it's not possible to change the "From"-adress then. That depends on the provider.
另一种可能性是由电子邮件提供商(例如 gmail)创建一个帐户并使用电子邮件提供商提供的 SMTP 服务器.但是,您也无法更改发件人"地址.
The other possibility is to create an account by an email provider (for example gmail) and use the SMTP server given by the email provider. But then you can't change the "From" address, too.
这篇关于发件人地址不适用于 PHP 邮件标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!