Click to See Complete Forum and Search --> : HTML EMail


DJRobThaMan
02-11-2008, 03:24 PM
Hi everyone,

I have a quick question. I am trying to figure out how to create an HTML email newsletter. From what I've been looking at from around the internest, the way that should be done is to just pretend like you're coding a website and instead of saving the code in an HTML file, you cut and paste it into your email client and send it off. I've tried quite a few tests of doing this and it doesn't work (at least not when I send the emails to my gmail account).

I get emails from godaddy which include embedded pictures and what seems to be an obvious HTML layout in that account, so I know that even though I'm probably doing something wrong it can be done. Anyone know how to get something like this working??

Here's an example of one of my quick tests that I sent myself and all I see when I open the email is the source code

Thanks


<html>
<head>
<title>
</title>
</head>
<body>
<img alt="" src="http://www.mashedbits.com/images/image.jpg">
</body>
</html>

TJ111
02-11-2008, 03:30 PM
You have to send the email with Content-Type: text/html headers. Depending on your email client, there are different ways to achieve this.

DJRobThaMan
02-11-2008, 04:16 PM
hmmm...
just mailed myself this


<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
</head>
<body>
<img alt="" src="http://www.mashedbits.com/imagesimg.jpg">
</body>
</html>


And still only source code. Was that what you meant?

TJ111
02-11-2008, 04:22 PM
Well, by default most mail programs send email as plain text. When you mail program gets email with a plan text header, it displays it as plain text. You have to send it as text/html, so that way email clients will intrepret the html. There is usually an option under tools or preferences to set it up to send html email.

kiwibrit
02-11-2008, 06:43 PM
I send my email newsletters, located on my web server, with php.

DJRobThaMan
02-11-2008, 06:49 PM
Could you tell me how to give the header that value (text/html) without using some type of server side script?

I'm trying to set it up so that somebody I know can send an html email, but they do not have a website that I could host any scripts on.

TJ111
02-12-2008, 08:35 AM
It's usually an option in your email client. I use Thunderbird, so for me all I do is go to Account Settings->Composition & Addressing, and check the box that says 'Compose Messages in HTML format'. It automatically sends the correct headers, and gives me options when I try to send an HTML email to a client that might not be able to receive HTML mail.

DJRobThaMan
02-12-2008, 09:00 AM
Sweet. I was actually using thunderbird and was typing code instead of just using that setting.

Thanks a bunch.