Welcome Guest, Not a member yet? Register   Sign In
Email class and hotmail!

I have been using the email activation class and no matter what i do the email doesnt seem to send to hotmail at all, although yahoo and gmail seem to get the site.

Has anyone ran into this before, if so how did you fix it.

Is it a codeigniter error or my server error.

Its nothing to do with CI. What SMTP server are you using for the out-going mail?

Check the spam/junk folder in hotmail. If certain headers aren't in there, then hotmail has issues with it.


hotmail has become persnickety recently. your email is probably getting blocked by them. what do your SMTP logs say? do you get a bounce message?

Yeh, Hotmail is a pain, it's a problem with the Sender ID I've found.


You guessed it, Microsoft makes our lives even more complicated... Smile

Yes, it is a problem. Ive got banned one billion times.

It can of course be a lot of things that make hotmail go nuts and put the mail to the junk.

It can be the words in the message itself that triggers the insain mr police officer spam filter.

It can be non-standard mail headers, or missing use of CRLF (in SMTP connections) (RFC1425, RFC822), so I believe you must use \r\n to seperate headers, although some Unix mail transfer agents may work with just a single newline (\n). Not sure if its the \r\n vs \n issue that causes the problem though.

But it can also be missing header elements..

mail ($to, $subject, $message, $headers);

$to = "someone <[email protected]>";
$subject = "You've got mail!";
$message = "Hello someone.";
$headers = "From: [email protected]\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Reply-To: me <[email protected]>\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSmail-Priority: High\n";
$headers .= "X-mailer: My mailer";

OK i am just doing,

$this->email->from('[email protected]', 'MySite');
$this->email->to('[email protected]');

$this->email->subject('Email Test With Codeigniter');
$this->email->message('Testing the email class.');


AND in my failure notice it says.

<<< 550 Your e-mail was rejected for policy reasons on this gateway. Reasons for rejection may be related to content with spam-like characteristics or IP/domain reputation problems. If you are not an e-mail/network admin please contact your E-mail/Internet Service Provider for help. For e-mail delivery information, please go to http://postmaster.live.com
554 5.0.0 Service unavailable

looks like hotmail (live.com?) thinks your email is spammy or your IP is spammy. try using a from address with a TLD that is not .mobi

also, check your sending IP address to see if it is on blacklists: google blacklist RBL etc... if it is, try to get it off.

Maybe this could be helpful: http://answers.cbfl.net/answers/threadview?id=606426

The thing i found REALLY weird is

== [ This doesnt work ]

$email['useragent'] = 'PHP/' . phpversion();


$this->email->to('[email protected]');
$this->email->from('[email protected]', 'MySite');
$this->email->reply_to('[email protected]', 'MySite');

$this->email->subject('Email Test With Codeigniter');
$this->email->message('Testing the email class.');


== [ This does work ]

$to = '[email protected]';
$subject = 'Email Test With Native PHP';
$message = 'Testing the email class.';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

if ( !mail($to, $subject, $message, $headers) )
die('It didnt go through!');

Its wierd, all i can think is that the useragent might effect it, but how i just did the useragent on the top one, it didnt change it in the email :\

Theme © iAndrew 2016 - Forum software by © MyBB