Welcome Guest, Not a member yet? Register   Sign In
Sending HTML Email
#1

[eluser]ggoforth[/eluser]
Hello All,

I'm trying to send HTML email which is working just fine, however I'm having some issues with the HTML styling. At first I was using remote style sheets, which I assumed should work fine, but after looking at the HTML code igniter is sending, it's looks very odd, which lots of extra chars. added that I didn't put there. Example of this below:

<link rel=3D"stylesheet" type=3D"text/css" media=3D'print' href=3D"http://=
www.myurl.com/mycss.css" />

Notice the random "3D" chars. that are showing up for some reason. The above example comes from the echo $this->email->print_debugger(); CI function. Any reason why this would be happening? Can you remotely link to CSS files for HTML email?

Thanks for any input anyone can offer!

Greg
#2

[eluser]Derek Jones[/eluser]
That's quoted-printable encoding. = is the quoted-printable escape character and 3D is the encoding for an equal sign, so the MUA will interpret =3D as simply =. In general, most MUAs are very random in what CSS they will and won't display, and most only do well with inline styles. Here's a quick guide from Campaign Monitor.
#3

[eluser]ggoforth[/eluser]
Thanks so much Derek. I was hoping to re-use my code I had for my printable reports, but I can probably whip something up with inline styles. For what it's worth, I'm testing this with Gmail, and haven't used Outlook or any other email programs. I'll check out your link. Thanks!

Greg
#4

[eluser]ejangi[/eluser]
If you can I would recommend testing in Outlook 2007 first, as it's the most picky of the bunch (believe it or not, it uses the Word 2007 rendering engine). You should find that what works in Outllook will work elsewhere, with a few minor updates to get it working in Gmail etc...
#5

[eluser]ggoforth[/eluser]
[quote author="Derek Jones" date="1200983054"]That's quoted-printable encoding. = is the quoted-printable escape character and 3D is the encoding for an equal sign, so the MUA will interpret =3D as simply =. In general, most MUAs are very random in what CSS they will and won't display, and most only do well with inline styles. Here's a quick guide from Campaign Monitor.[/quote]

That is a great article. Thanks to everyone for the replys.

Greg
#6

[eluser]Chris Newton[/eluser]
As someone that codes email (partly) for a living I'll tell you this: I use basic inline styles for minor things, colors, fonts, basic padding. For actual layout... it's ALL tables. Lame I know, but I can't tell you how many email apps screw stuff up if you position with CSS.

And ucantblamem is right. Outlook 2007 is like stepping back in time to 1998. Outlook 2000 renders CSS better.
#7

[eluser]Edemilson Lima[/eluser]
The only thing I don't saw in CI Email class is a method to embed images into the HTML Email. In my old web sites I was using PHP Mailer (http://phpmailer.sourceforge.net) and it have this feature.

The only way to put images into HTML Emails is pointing images at your server (using full URLs), but webmails and Email clients will not display these images automatically. If you embed them into the Email, they will appear normally, without user intervention.
#8

[eluser]frenzal[/eluser]
Even most embedded iamges get blocked these days too.
#9

[eluser]Chris Newton[/eluser]
Worse, the email gets sent to the spam folder of many of the major vendors. Deliverability is very low on email with HTML + embedded images. Much lower than email with linked images.
#10

[eluser]Edemilson Lima[/eluser]
I don't think so. I made my tests and it works fine on most web mails out there. The problem with Emails that have linked images is the fact that a spammer can use it to validate Emails in their lists. When somebody opens a spam message and the image is loaded from an URL, it send an ID to a script in a web server somewhere. This does not happen with embed images, because they are sent with the Email as attachments, so I think embed images are less probable to be blocked than linked images. At least, that is the logic. Ok, the message is larger than a message with only linked images, but I think the problem of to be blocked by some anti-spam is because the message does not come from a know Email client or web mail, may it doesn't have all necessary headers (like Return-path, for example), doesn't have a valid Email address or the server doesn't have a MX record. There are many things that can block a message, but if it is the case, the addressee can mark it as not spam. But I agree that is preferable to send messages as plain text. They are lighter and is more likely to be accepted everywhere.




Theme © iAndrew 2016 - Forum software by © MyBB