Email message is always sent as plain text and the body is full of weird code |
[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?
[eluser]CroNiX[/eluser]
When sending it as html, do you use html and body tags like it's supposed to have?
[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?
[eluser]landitus[/eluser]
This is the body of the email with the html tags. Still wrong. Code: Reply-To: "[email protected]" <[email protected]>
[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';
[eluser]InsiteFX[/eluser]
Code: // wrong! Then use set_alt_message()
[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!
[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 |
Welcome Guest, Not a member yet? Register Sign In |