ChrisMartino Posted September 25, 2010 Share Posted September 25, 2010 Hello there, I've come across a issue with using PHP's mail function due to the fact I've tried a assortment of different headers yet Hotmail continues to place my sent emails in the junk folder. Here is my method of emailing my clients: function Email($AccountID, $Subject, $Message) { if($this->IsValidAccount($AccountID)) { $Account = $this->AccountKeys($AccountID); $headers .= 'To: '.$Account['account_client'].' <'.$Account['account_email'].'>' . "\r\n"; $headers .= "From: X-Host <[email protected]>\r\n"; $headers .= "Reply-To: X-Host <[email protected]>\r\n"; $headers .= "Return-Path: [email protected]\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers .= "Organization: X-Host\r\n"; echo $Account['account_email']. $Subject. $Message; return mail($Account['account_email'], $Subject, $Message, $headers); } else return InvalidAccount; } So could anybody help me out please and tell me what headers I should be using. Link to comment https://forums.phpfreaks.com/topic/214388-mail-gets-junked-via-hotmail-phps-mail-function/ Share on other sites More sharing options...
coupe-r Posted September 25, 2010 Share Posted September 25, 2010 I also have this problem. Link to comment https://forums.phpfreaks.com/topic/214388-mail-gets-junked-via-hotmail-phps-mail-function/#findComment-1115653 Share on other sites More sharing options...
jcbones Posted September 26, 2010 Share Posted September 26, 2010 Hotmail will send you emails to the junk folder if a lot of people are sending them to junk on receiving them. Not advising, advertising, or etc. This just explains the process Hotmail uses. Any action taken by you, is your business. Link to comment https://forums.phpfreaks.com/topic/214388-mail-gets-junked-via-hotmail-phps-mail-function/#findComment-1115713 Share on other sites More sharing options...
FaT3oYCG Posted September 26, 2010 Share Posted September 26, 2010 try mailto: instead of to: if that does not work try adding from: header that is more specific Link to comment https://forums.phpfreaks.com/topic/214388-mail-gets-junked-via-hotmail-phps-mail-function/#findComment-1115717 Share on other sites More sharing options...
Pikachu2000 Posted September 26, 2010 Share Posted September 26, 2010 I'm unaware of a valid email header 'mailto'. Where is that defined? Link to comment https://forums.phpfreaks.com/topic/214388-mail-gets-junked-via-hotmail-phps-mail-function/#findComment-1115722 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.