CodeIgniter Forums
Email - Missing/Incorrect headers - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Email - Missing/Incorrect headers (/thread-48125.html)

Email - Missing/Incorrect headers - El Forum - 01-05-2012

[eluser]Billy Khan[/eluser]
Have come across some strange naughtiness within libraries/Email.php.

I was battling with some simple email sending, I checked my server and all looked ok, but it would not send email either as "mail" or "sendmail". The debugger would say it couldn't send the email.

After much digging I started outputting debug within libraries/Email.php and spotted that headers were not being written correctly.

Firstly, when set to "mail", it would write the from header like so:
[email protected]
with no From: attribute.

When set to "sendmail", it would not add in the Recipient, resulting in an empty "To" field. When, within the function "_set_header" I hardcoded the "To" as a test, it would finally send the email.

I believe there are issues with the Email library, can anyone else confirm this?