Jump to content

Mail gets junked via Hotmail (PHP's Mail function)


ChrisMartino

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.