Quantcast

Forums | MacLife

You are not logged in.

#1 2007-09-12 4:21 pm

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

HTML emails with images

Hi,

I've searched everywhere trying to find out how to create an HTML email with images. Not how to build it -- that's done, easy info to find, whatever -- I'm looking for how to get it working. I can't just plunk the HTML into an email in Mail and expect it to work. So what do I do? Here are my various applications for clients:

1) email generated from a user-filled form and sent out with a script. images included.

2) HTML signature -- I received a tutorial on how to attach in Mail but I need it done in Outlook.

3) email sent from the email client (PC, probably Outlook) with a linked graphic and some text.

I'm well aware of the enormous variety of results that will occur. Of course I can't test it until I can send it! Anyone know off-hand or able to point me somewhere?

Thanks very much!


so much for having the fastest MBP available.

Offline

 

#2 2007-09-12 4:38 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

What is the purpose of the email?

Is this a bulk mail? Is this in response to a user submission?

Offline

 

#3 2007-09-12 5:17 pm

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3694

Re: HTML emails with images

Offline

 

#4 2007-09-12 6:13 pm

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

Gipetto wrote:

What is the purpose of the email?

Is this a bulk mail? Is this in response to a user submission?

Oh, heavens no!
Not sure why the purpose matters in answering my question, but anyway:

1) is users sending an e-invite to their friends via the site (don't worry, anti-spam measures in the form are included)... a second similar one is users recommending the site to their friends (sorry I can't disclose anything less spammy-sounding)

2) is just what it says, a signature, from employees at the client's company

3) is an email sent to select people to notify them of the latest newsletter's availability


Thanks, Light Speed, my coworker has already been checking out PHP list. I'm not looking for any scripts at this time.


so much for having the fastest MBP available.

Offline

 

#5 2007-09-12 7:09 pm

D'Eyncourt
OMGDICTATOR
Registered: 2001-12-27
Posts: 8808
Website

Re: HTML emails with images

A problem with HTML emails is that they are annoying for people who choose to receive their mail in plain text.

Another is that they can force the recipients to download things (pictures, animation, movies, viruses, worms) if they want to be able to make sense of them. I'm not saying that you would include the last two, but how can the recipient tell? Because of these bad possibilities I have all of my e-mail programs set to receive plain text.

They are also wasteful of sometimes limited resources--you want to fill up my inbox with messages containing (each!) 20 MBs of a pretty background and pictures which add little or no substance to your message? Gee, thanks, I really appreciate that.

All of these makes you or your company memorable in a very poor way. The best thing to do with HTML email is DON'T.


BOYCOTT SONY

"I think the question now is not whether you went to Vietnam or whether you didn't, whether you fought in the war or fought against the war. I think the only question is whether we can find a president smart enough never to make a mistake like that again"--Molly Ivins, way back in 1992

Offline

 

#6 2007-09-12 7:32 pm

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3694

Re: HTML emails with images

D'Eyncourt wrote:

A problem with HTML emails is that they are annoying for people who choose to receive their mail in plain text.

The best thing to do with HTML email is DON'T.

+1

Offline

 

#7 2007-09-12 10:27 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

That's why you ALWAYS include the plain text alternate. That way if the person is that stingy about the format of their email they've already stipulated that the client use plain text alternates when available.

Ding, preferences honored! The people who really want to complain can first learn how to use their frickin' email client!

Penguin - knowing how it is intended to be used helps with suggesting procedure.

For most of those just a regular PHP email script would work fine... for the notification of updated content I'd suggest an RSS alternate as well. The email for that can be a simple email script as well that triggers on the release date of the material.

I've never used PHP list... in fact, I don't have many outside scripts running aside from OpenAds (which i intend to replace to get something more lightweight... I've got that earmarked for that ever elusive "free time").

Last edited by Gipetto (2007-09-12 10:27 pm)

Offline

 

#8 2007-09-12 10:38 pm

TonyPrevite
Slobbering Jester
Royal Wombat
From: Glendale, AZ
Registered: 2002-04-14
Posts: 3606
Website

Re: HTML emails with images

Gipetto wrote:

For most of those just a regular PHP email script would work fine... for the notification of updated content I'd suggest an RSS alternate as well. The email for that can be a simple email script as well that triggers on the release date of the material.

Penquin, if your wondering about sending both text and html at once and letting the user determine the format, then look into sending a "multipart mime boundary email"  or "multimime format".   It's actually pretty straighforward and there's loads of info out there on how to create them.

Here's just one of many examples.

Offline

 

#9 2007-09-12 10:51 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

I found 'em to be rather infuriating... my script ends up double wrapping the content portion to get the alternates to transfer correctly to Outlook.

Offline

 

#10 2007-09-12 11:09 pm

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

Phew.

I did probably 2 hours of research and 1 hour of design refinements today for just one of these things. Thanks for the RSS tip -- that might just make the third client happier.

D'Eyncourt: what Gipetto said. Again, I've done tons of research. Don't let the silly old name fool you: I know what I'm doing aside from the unanswered questions here. I'm a web designer not a n00b. If you don't want to receive rich text emails, turn the rich text display off. And I don't know what kind of email you're using but I can't receive or send anything bigger than 4mb -- and that's generous -- so don't exaggerate.

As far as I've read, if they have images off (or CSS is disabled by Gmail, etc.) then it will render itself as plain text. I should mention the target users are like 99% PC users and we know that.

Thanks for the resource, Tony. eek

Anyway my original question still remains unanswered: how the heck do I get the HTML into the email without it just coming up as code?

Last edited by penguinsocks (2007-09-12 11:11 pm)


so much for having the fastest MBP available.

Offline

 

#11 2007-09-12 11:13 pm

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

I'm not too concerned about user preference switching since the HTML emails will be for a very limited number of users. The one I'd be more concerned about will only have one image anyway that will either appear or it won't. We haven't started designing it yet but hopefully I can fight for accessibility over brand strategy. Will it just render nicely without graphics if the user has them disabled?

Last edited by penguinsocks (2007-09-12 11:14 pm)


so much for having the fastest MBP available.

Offline

 

#12 2007-09-12 11:42 pm

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

penguinsocks wrote:

Anyway my original question still remains unanswered: how the heck do I get the HTML into the email without it just coming up as code?

No, you just don't know how to read the answers... at the very base of it is: http://us3.php.net/mail

Last edited by Gipetto (2007-09-12 11:43 pm)

Offline

 

#13 2007-09-13 12:12 am

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

The link Tony gave was for further down the page (which wasn't obvious) and his message was referring to MIME types.

Is that page for sending HTML email? If so, we're way beyond our league with this one. Fortunately we have a programmer for the biggest piece of work... $$$$$

Do you realise, Gipetto, that you've come off as being rude and patronizing to me in some of your replies to my past few posts? I come here for help, not to be put down. Maybe it's not your intention and this IS the Internet, but that's how I feel.


so much for having the fastest MBP available.

Offline

 

#14 2007-09-13 2:44 am

D'Eyncourt
OMGDICTATOR
Registered: 2001-12-27
Posts: 8808
Website

Re: HTML emails with images

penguinsocks wrote:

[snip]
D'Eyncourt: what Gipetto said. Again, I've done tons of research. Don't let the silly old name fool you: I know what I'm doing aside from the unanswered questions here. I'm a web designer not a n00b. If you don't want to receive rich text emails, turn the rich text display off. And I don't know what kind of email you're using but I can't receive or send anything bigger than 4mb -- and that's generous -- so don't exaggerate.
[snip]

Ever get rich-text e-mails in plain text? They are simply an unreadable mess. You want me to spend my time parsing out your message from the gobblety-gook of the rich-text commands? Sorry, into the trash it goes.

Perhaps most of the people you know are tech-savvy and -connected enough that they do not mind the overhead, but if you are planning to send this mail to the general public then prepare to be disappointed.

I'm sorry that you felt that I was treating you as a n00b, but realize that I don't know you. I may lay out perhaps more detail than you may need, but my detail can benefit those who ARE n00bs.


BOYCOTT SONY

"I think the question now is not whether you went to Vietnam or whether you didn't, whether you fought in the war or fought against the war. I think the only question is whether we can find a president smart enough never to make a mistake like that again"--Molly Ivins, way back in 1992

Offline

 

#15 2007-09-13 4:08 am

TonyPrevite
Slobbering Jester
Royal Wombat
From: Glendale, AZ
Registered: 2002-04-14
Posts: 3606
Website

Re: HTML emails with images

penguinsocks wrote:

Do you realise, Gipetto, that you've come off as being rude and patronizing to me in some of your replies to my past few posts? I come here for help, not to be put down. Maybe it's not your intention and this IS the Internet, but that's how I feel.

You've got be kidding me... are you serious?

What and this isn't?

penguinsocks wrote:

I know what I'm doing aside from the unanswered questions here. I'm a web designer not a n00b.

penguinsocks wrote:

Not sure why the purpose matters in answering my question, but anyway:

If you weren't such a n00b, you'd know why purpose matters  bang

Sorry, but you just lost ALL your credibility.  So if you think Gippy is being rude....

Sorry, but you obviously DON'T know what you're doing and are attempting to cover up for it by talking your way around it.   That doesn't fly, be honest... all you had to say is  "I'm not a programmer at all and I have this client that needs to...."  Instead of this blunderbuss about knowing what your doing. 

Did you actually read through that code?  You don't have to know how to program in PHP to get the jist of what's going on, if you did, you would have quickly surmised that a MIME type is what an email program would use to determine how it will display an email, either as text or html.  By setting MIME boundaries in the email you specify which message is text and which one is html.  This makes it completely transparent to the user and they won't see code if they choose to not view html email.  What they will see is your nicely formatted text alternative.

Now if you were up front in saying that you don't program at all, I could have turned you onto this program.  Intellimerge  It will take care of creating your emails in multimime format for you and handle list management as well.

That's a good one for the Mac, if your client wants to control this and is on Windows, there are any number of programs that will do the same thing.

Of course if you want to launch this from a website... then yes, programming will be required in whatever language the server uses.  Your programmer should know how to do this, and as I eluded to before is pretty straightforward no matter which language is used to script it.

Sorry, we assume a certain level of basic programming to these kind of questions.  Web Development isn't just about design and it isn't just about programming.  It's both.  So if you're not a programmer, just say so... we won't bite your head off.

But try to act like one.... and we will.   eek

For a better look at what's involved  ThinkVitamin  Bookmark it and visit often!


D'Eyncourt wrote:

Ever get rich-text e-mails in plain text? They are simply an unreadable mess. You want me to spend my time parsing out your message from the gobblety-gook of the rich-text commands? Sorry, into the trash it goes.

Sorry, you were the victim of someone who didn't know how to do it right and just ignored text users.  Done correctly, you wouldn't see that mess.  Which is exactly what we were trying to convey.

When your in the "business" of coming up with solutions, the "don't send html emails" mantra doesn't fly.   It can be done correctly.   

And don't assume you're in a sizeable demographic either.   At my last gig, we sent out about 500,000 emails every week all around the country.  Want to know how many viewed the text version?  Less than 1/2 of 1%.   So there's one reason why you still see those malformed emails... nobody cares about a number so small.   Doesn't make it right, I'm just sayin.

Last edited by TonyPrevite (2007-09-13 4:31 am)

Offline

 

#16 2007-09-13 10:17 am

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

I love you, Tony, but I think you already know that.

Offline

 

#17 2007-09-13 10:29 am

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

Penguin, sorry if I came off that way, but you've insisted that you're not a n00b on many occasions and the link Tony provided was more than thorough about the process of constructing and sending an HTML email. In fact, I think that is one of the sources I used when writing my way of doing it...

I'm not gonna beat a dead horse too much, but your answers indicated that you didn't even read the posted resource.

If you're looking to get an HTML email built in a mail client then its the wrong process for what you listed above (at least, to me since it requires manual intervention on each iteration), but you can use the FAQ we put together on the subject: http://www.maclife.com/forums/topic/46092#p1186266

The short answer, though, to do this (and we've used this process many many times to do one-off HTML emails) is to use one of three ways:
[list]
[*] In Safari do File -> Mail Contents of this page
[*] Copy and paste HTML content from a browser window into a new message
[*] TextMate has a Mail bundle that will do this
[/list]

Again, that will do it, but that requires you to manually handle the process each time...
I didn't know about that last option until I just did a Google search for it, I'm gonna have to look into that for the odd email.

I hope you realize that we were trying to steer you in the direction that we considered best for the process. I consider Tony to be a rather "complete" resource - so when he answers... wink The processes listed at the bottom of this post are in no way considered "production methods" since they aren't automated, and in my view don't fit your needs well.

Last edited by Gipetto (2007-09-13 10:31 am)

Offline

 

#18 2007-09-13 10:30 am

Gipetto
Yankee Doodle's noodle
Royal Wombat
From: People! Ahg!!
Registered: 2000-09-24
Posts: 9941
Website

Re: HTML emails with images

Aw, smurf, I forgot this is punBB - I think you get the idea with the list...

Offline

 

#19 2007-09-13 11:37 am

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

Thanks, guys.

I took a glance at that post but I thought it was only pertinent to MIME types. And yes, I know what they're for wink

Sorry, I should have cleared up what my skills are on here (XHTML/CSS/Flash/minimal programming; Movable Type and design) first. smile Turns out the HTML email is definitely not as simple as I'd *hoped*.

I'll definitely check out those resources. The list there: what a godsend. EXACTLY what I was looking for (I think). Man, nothing I read ever said anything about external programs or scripts or anything, and all I could tell was Mail didn't have anything for inputting HTML emails. Wish we did this research before leaping into this stuff... though they probably would have still wanted a fancy HTML email smile

Intellimerge looks good. Know of any examples off hand for PC? Or what search keywords should I use? Our clients are all on PC. So I think we're looking for a program to do this. Testing is going to be fun roll

One of the emails is going to be sent to some pretty tech-savvy under-35s, currently predominantly PC-only; the other will likely be sent to over-25s including some less tech savvy people and people on older systems so that one's going to stay pretty basic. Can the client stick an image (like the header banner) into their Outlook email? Will that work? She's very leary of technology so we're trying to keep it as simple as possible for her.

Last edited by penguinsocks (2007-09-13 11:38 am)


so much for having the fastest MBP available.

Offline

 

#20 2007-09-13 12:02 pm

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

Hey guys,

I feel kinda crappy about our fighting... I really appreciate the time you've taken to find resources for me and post your knowledge. I hope I can answer questions for you sometime if you need help with anything.

Turns out our programmer got frustrated with PHP mail and wrote his own, lol. So I think we'll be ok on that front.


so much for having the fastest MBP available.

Offline

 

#21 2007-09-13 1:18 pm

TonyPrevite
Slobbering Jester
Royal Wombat
From: Glendale, AZ
Registered: 2002-04-14
Posts: 3606
Website

Re: HTML emails with images

penguinsocks wrote:

Hey guys,
I feel kinda crappy about our fighting... I really appreciate the time you've taken to find resources for me and post your knowledge. I hope I can answer questions for you sometime if you need help with anything.

That's the spirit, don't sweat it.  I don't even consider that a fight, really.

Now as far as programs for the PC for email list management, I have no clue really.  I would use the search term "email list management" and there will be TONS of options... the trick is finding one that actually does what it says.

Features to look for in your case:

100% editable HTML email and template creation.

The ability to create text only alternative versions and send as Multi-Mime Alternative.

Email list creation from an imported .csv file (Excel) - Just about all email clients have the ability to export addresses as .csv files.

The ability to spread out delivery over time and multiple accounts/servers - This is important for folks who will be using the software and delivering email through their ISP.   Lot's of ISP's frown on the use of their email servers for sending out mass mailings.... even smallish ones.  So this is a must have, as I'm sure your clients probably don't have their own on-site email server that they have total control over.

Those are the biggies.

Email is a hairy mess.  There are lot's of things involved behind the scenes that lot's of people aren't aware of.  This compounded with the fact that people have become pretty sensitive about the "crap" they receive in their inbox and service providers spam fighting measures can blacklist a domain and IP address block pretty quick!

On a small scale, probably not a big deal...but when it gets larger to the magnitude of sending hundreds of emails a week, other things to consider would be how to handle bouncebacks and scrubbing your list of invalid emails, the AOL loopback process (AOL user complains about your email) Blacklists, service providers spam weighting process....  it's actually a nearly endless list of things to consider when doing larger opt-in campaigns.

So now you know wink

Offline

 

#22 2007-09-13 9:59 pm

Light Speed
Doubter of Einstein
Registered: 2002-08-17
Posts: 3694

Re: HTML emails with images

TonyPrevite wrote:

Features to look for in your case:

100% editable HTML email and template creation.

The ability to create text only alternative versions and send as Multi-Mime Alternative.

Email list creation from an imported .csv file (Excel) - Just about all email clients have the ability to export addresses as .csv files.

The ability to spread out delivery over time and multiple accounts/servers - This is important for folks who will be using the software and delivering email through their ISP.   Lot's of ISP's frown on the use of their email servers for sending out mass mailings.... even smallish ones.  So this is a must have, as I'm sure your clients probably don't have their own on-site email server that they have total control over.

Those are the biggies.

http://www.phplist.com/

in conjunction with

http://phpmailer.sourceforge.net/

Offline

 

#23 2007-09-14 3:27 pm

penguinsocks
thirteen cent pinball
From: Vancouver, BC
Registered: 2005-08-04
Posts: 78
Website

Re: HTML emails with images

Thanks Light Speed
(Tony I'll get back to you later)

Our programmer wrote his own mailer for the 1st instance I mentioned and it works beautifully!


so much for having the fastest MBP available.

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson