CI 2 Email problems |
[eluser]dudeami0[/eluser]
When trying to create a html email, I get a blank message in Thunderbird. I tested it with plain text and it works fine. I'm using a local Mercury installation. Anyways, this is my code: Code: $html = $this->load->view('email', '', true); And this is the output of the debugger Code: Your message has been successfully sent using the following protocol: mail I noticed that the output of the HTML does not have a new line after the headers (Which I think I remember being a bit important, maybe not though). Any help would be much appreciated ![]()
[eluser]novice32[/eluser]
Not sure if this will solve your problem, but in my case, the boundary characters (--B_ALT_4cd9fda874c62--) would always show in the email footer when viewed in Outlook express (testing locally on Win 7, XAMPP). I read the Email.php core class to see how "send_multipart" is set. By default, it's TRUE. I set it to FALSE, and my boundary line no longer showed. While not in the CI User Guide as a parameter, you can set send_multipart just like the other settings (i.e. Code: $config_email['send_multipart'] = FALSE;
[eluser]dudeami0[/eluser]
Hmm, seems kinda of the opposite of what I want to do. I need to send a HTML and Plain Text email, possibly with some attachments. If I disable send_multipart that gets rid of that functionality, or am I misunderstanding it?
[eluser]novice32[/eluser]
I don't believe Multipart is related to attachments but rather backwards compatibility. I got the below from Wikipedia (http://en.wikipedia.org/wiki/MIME#Multipart_subtypes): Most commonly, multipart/alternative is used for e-mail with two parts, one plain text (text/plain) and one HTML (text/html). The plain text part provides backwards compatibility while the HTML part allows use of formatting and hyperlinks. Most e-mail clients offer a user option to prefer plain text over HTML; this is an example of how local factors may affect how an application chooses which "best" part of the message to display.
[eluser]novice32[/eluser]
I do see the need where you want plain text option as well. Not sure what to suggest next.
[eluser]dudeami0[/eluser]
Edit: Misunderstood some things :p Hmm.. I'll probably just end up making a custom library to handle emailing :p This is causing alot of trouble for me :S Thanks for the help though ![]()
[eluser]InsiteFX[/eluser]
I use this one and have never had a prolem with testing emails. Test Mail Server Tool for Windows InsiteFX
[eluser]dudeami0[/eluser]
Hmm, still getting problems with it. I just ended up making a custom email class to use. Also, thanks for the tool InsiteFX, very nice ![]()
[eluser]InsiteFX[/eluser]
Try taking this out, defaults to Codeigniter. Code: $config['useragent'] = 'Gfxtub.com'; InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |