CodeIgniter Forums
My application's email messages aren't being delivered - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: My application's email messages aren't being delivered (/thread-13233.html)



My application's email messages aren't being delivered - El Forum - 11-15-2008

[eluser]KeyStroke[/eluser]
Hi,

I'm having a stubborn problem with my application where the e-mails it sends isn't received by many e-mail providers. Some receive them, but classify them as spam, which is not acceptable.

I'm using PHP's mail functions, and sending these headers:
Code:
$eol = "\n";
        $headers = 'From: ' . email_address('info') .$eol;
        $headers .= 'Reply-To: ' . email_address('info') .$eol;
        $headers .= 'Return-Path: ' . email_address('info') .$eol;    // these two to set reply address
        $headers .= 'Content-Type: text/html; charset="iso-8859-1" ' . $eol;
        $headers .= 'Content-Transfer-Encoding: 7bit ' . $eol;
        $headers .= "Message-ID: <".time()." [email protected]".$_SERVER['SERVER_NAME'].">".$eol;
        $headers .= "X-Mailer: PHP v".phpversion().$eol;
the email_adress() function just returns one of our e-mail addresses from the database.

1) How do I fix this issue and insure my emails are delivered to everyone?

2) Is there any decent CI email library I could use that works with CI 1.7?


Your help is MUCH appreciated


My application's email messages aren't being delivered - El Forum - 11-15-2008

[eluser]davidbehler[/eluser]
Why not use the build-in CI email library?

See here for further info: http://ellislab.com/codeigniter/user-guide/libraries/email.html


My application's email messages aren't being delivered - El Forum - 11-15-2008

[eluser]KeyStroke[/eluser]
Thanks man! it worked!!

I think I've assumed that this library just wraps up PHP's mail function, but it doesn't.

Shall I use it as my main mailing method for a e-mail hundreds of e-mails a day (mostly notifications for users), or rely on something else for that?

Also, any tips on how to avoid spam filters or being considered as spam? because, now for instance, Outlook 2007 considers the e-mail I send through my app as spam.