Welcome Guest, Not a member yet? Register   Sign In
Email class bug - HTML problem [SOLVED]

Hi guys, I've been using CI for over a year now, and I'm loving it.

Here's where the problem is:

- I have a newsletter to send to bunch of people
- Email is working, and I'm sending HTML rendered file (all with tags <HTML><HEAD><TITLE>...<BODY></BODY></HTML>)
- the problem is that, in some email clients or services the HTML is displayed just fine. in others - it doesn't show up right.

I'm attaching 3 pictures here. First is successfull email, which I'm viewing in my own account in Thunderbird. Second is Gmail, which is not displaying anything right, and the third is Yahoo, which hides entire email.

Can anyone help me out here?
Here's the code I'm using to send emails, it's pretty basic, by-the-book example:

        $next_buffer = $this->m_newsletter->read_newsletter_buffer();
        foreach($next_buffer as $mail) {
            // send email
            $this->email->from('[email protected]', 'MY WEB SITE');
            $this->email->set_alt_message('You need HTML support, sorry.');
            // delete this user from newsletter-buffer!

and here are the 3 photos I was talking about:

[Image: thunderbird.png]

[Image: gmail.png]

[Image: yahoo.png]

Thanks a lot for your time.
I've read almost anything on the forums related to Gmail or HTML email problems, but couldn't find the answer to this problem of mine.

Hope the solution for this will help somebody else, and that we will improve CI even further! Smile

Anybody? Please? Pretty please? Pretty please with sugar? Pretty please with sugar and a cherry on the top? Smile

[eluser]Pascal Kriete[/eluser]
Reduce, reduce, reduce. That's the best advice I can give.

You actually picked some moderately nice clients. Microsoft Outlook ... well, I won't repeat what has been said. Campaign monitor has a great guide to css in emails that might be helpful as well.

Start out very simple and build it up until it breaks. Rinse and repeat.

so, basically, this is not really a CI problem - well, at least it probably isn't (email class has been recently tightened to fix some strange bugs and what you are describing sounds like typical email client munging of HTML email).

So, what you are asking for is help debugging the different ways that mail clients handle the rendering of HTML email.

pascal's link to campaign monitor should be in your own bookmark list - they have done all the hard work of testing most email clients and preparing HTML templates that work the "same" in all of them.

cheers. and let us know what you come up with.

oh man.. and I thought this was a CI bug related to HTML emails... my bad guys. Tongue
thanks for the emails, I'm trying to make it work now, my HTML/CSS coder is working on it as we speak, and I've bookmarked the links Pascal gave me... Smile

thanks again for your great tips&help;, and sorry for reporting "CI bug", when this was a mistake on my end, in my HTML/CSS email coding standard.

Thanks again to both of you, you've really saved the day. Smile

Alright guys, just to hit you back - it's WORKING!! Smile

Almost every client is working for me, the only problem now that I have is with "Yahoo" emails, because there the email doesn't show up at all. I mean - I do get an email from my server, but I see the blank page.

Do you have any more tips for me?
I've read on the web that many developers and many bigger companies are having problems with Yahoo lately, so should I keep digging for solution, or just accept the fact that I cannot push HTML emails to my Yahoo users?

thanks again for the time,

make sure you are using the most recent CI build 1.7.1. there was a curious problem with an older CI email class that caused Yahoo to behave exactly the way you describe.

if you are at the most recent build then my advice to you is again the same as Pascal's: start simple - like make an HTML email with just a body tag, then build it up until it breaks - typical debugging stance, really.

good luck and thanks for the report on your progress.

yup, you're right dude, this project is over 6 months old, so I was using 1.5.x back then.

could I upgrade only the email library from 1.7, without jeopardizing the rest of my 1.5 version, which is now live on pretty large and active site?

I mean, if I download CI 1.7.1, and copy the file "/system/libraries/Email.php", to my server, will that work? :\
what do you think? is it worth a shot? is that safe?

thanks again for your help and forum activity!

yes. yes. good. yes. yes. no problem.

dude!! it worked!!! Smile

ok, so - the last thing I did was:

1) download CI 1.7.0
2) upgrade only this file on my server: /system/libraries/Email.php

and that worked!! Big Grin

now emails are arriving perfectly at all email clients (Thunderbird, Outlook...), and on gMail, on Yahoo, on Hotmail, everywhere!!! Big Grin

thanks guys, I really appreciate the help!
if we ever meet - you all got yourself a free round of beer! ^_^


Theme © iAndrew 2016 - Forum software by © MyBB