pioneerx01 Posted December 27, 2011 Share Posted December 27, 2011 Hi, I am using the following PHP email code, and when I send it to my Gmail account it works fine, but some servers are blocking this email and are not being received. How can I tweak it to make it more compatible? $headers = "From: $row_o_email[email] \r\n"; $headers .= "BCC: $row_o_email[email] \r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $to = $row_e['email']; mail($to, "subject", " email body ", $headers); Quote Link to comment https://forums.phpfreaks.com/topic/253910-how-to-make-this-email-code-addeptable-by-servers/ Share on other sites More sharing options...
trq Posted December 27, 2011 Share Posted December 27, 2011 Is the "From" header a valid email address on the server you are sending the email from? If not, receiving mail servers will always be suspect of it and will generally mark it as spam and send it to the trash. Quote Link to comment https://forums.phpfreaks.com/topic/253910-how-to-make-this-email-code-addeptable-by-servers/#findComment-1301682 Share on other sites More sharing options...
pioneerx01 Posted December 27, 2011 Author Share Posted December 27, 2011 Yes, it is. Quote Link to comment https://forums.phpfreaks.com/topic/253910-how-to-make-this-email-code-addeptable-by-servers/#findComment-1301684 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.