Email message is always sent as plain text and the body is full of weird code - 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 message is always sent as plain text and the body is full of weird code (/showthread.php?tid=51266) |
Email message is always sent as plain text and the body is full of weird code - El Forum - 04-26-2012 [eluser]landitus[/eluser] Hi, I've been sending an activation email after a form submit and every time the email I get shows exactly this: Code: Reply-To: "[email protected]" <[email protected]> As you can see it's like the headers are all over the place. I tried setting the email as plain and html, but it's the same. I'm testing this locally, with MAMP and sending with gmail (SMTP). This is my email config: Code: $config['protocol'] = 'smtp'; What can I do? Email message is always sent as plain text and the body is full of weird code - El Forum - 04-26-2012 [eluser]CroNiX[/eluser] When sending it as html, do you use html and body tags like it's supposed to have? Email message is always sent as plain text and the body is full of weird code - El Forum - 04-26-2012 [eluser]landitus[/eluser] No, I'm going to try that. What's weird is that no matter what mailtype I try, the debugger shows it's Content-type is text/plain. Also, It says it's using the mail protocol, which it's not. Is this a bug? Email message is always sent as plain text and the body is full of weird code - El Forum - 04-26-2012 [eluser]landitus[/eluser] This is the body of the email with the html tags. Still wrong. Code: Reply-To: "[email protected]" <[email protected]> Email message is always sent as plain text and the body is full of weird code - El Forum - 04-28-2012 [eluser]Sumeet Kashyap[/eluser] While initializing the class, remove "\r\n" for crlf and newline. It should work then. So it should be: Code: $config['protocol'] = 'smtp'; Email message is always sent as plain text and the body is full of weird code - El Forum - 04-28-2012 [eluser]InsiteFX[/eluser] Code: // wrong! Then use set_alt_message() Email message is always sent as plain text and the body is full of weird code - El Forum - 05-09-2012 [eluser]landitus[/eluser] It turns out it had to do with a conflict with Ion Auth (I had it in my autoload) which overrode the email library configuration in this very case. Thankfully, I told Ben of Ion Auth about it and he already got it fixed!! Thanks Ben! Email message is always sent as plain text and the body is full of weird code - El Forum - 10-17-2012 [eluser]alexman[/eluser] Could you post a link to the bugfix, which code needed to be tweaked and/or which version it was fixed in? Thanks |