我一直在使用PHP邮件功能发送包含帐户详细信息的电子邮件给客户,当他们注册但我只是发现有些人没有收到电子邮件。例如。当我测试的只有我和另外一个collegue正在接受PHP邮件功能不发送邮件到某些地址
- me who received email
- [email protected]
- collegue who received email
- [email protected]
- collegue who did not receive emails:
- email 1 - [email protected],
- email 2 - [email protected]
- collegue who did not receive emails:
- [email protected]
- collegue who did not receive emails:
- [email protected]
这些电子邮件不是在垃圾邮件文件夹或者..
$from = "companyy <[email protected]>";
$subject = "$username Account Details for companyy.co.uk";
$message = "You have been registered as an administrator of companyy Online.
You can manage your clients, bills and other account functions online.
Your Username: $username
Your Password: $password2
Your Four-Digit PIN: $PIN
Once logged in you can change your password to something you will find easier to remember. Please delete this email once you have changed your settings or memorised them.
Thank you
This is an automated response, please do not reply!";
mail($email, $subject, $message, $from);
Header('Location: results.php?msg=Added Successfully');
即使他们没有在垃圾邮件文件夹最后,在回答了许多点,“为什么我的邮件中的垃圾邮件文件夹结束”的问题(HTTP ://stackoverflow.com/search?q = php + spam + mail)也适用于此。这个脚本是否在'companyy.co.uk'的服务器上运行? – 2011-02-28 11:28:55
查阅Jeff Atwoods关于发送电子邮件的文章 - 一些非显而易见的陷阱:http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code .html – 2011-02-28 11:30:30
你使用的是sendmail还是什么类型的邮件服务器? – 2011-02-28 11:32:09