CodeIgniter Forums

Full Version: Email - Missing/Incorrect headers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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?