我一直在使用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