CodeIgniter Forums
Email - Missing/Incorrect headers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Email - Missing/Incorrect headers (/showthread.php?tid=48125)



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?