# E-mail like webpages!!??



## Inline_guy (Mar 6, 2003)

OK smarties it is time to party.  I want to know how to make an e-mail that reads like a webpage.  You know what I'm talking about?  Like if any of you get those announcements from Apple. They appear in your your inbox as little webpage looking things.  I am attaching a picture so people know what I am talking about.

I am going to make a site announcement, in the style of my new site, and send it to my friends to let them know I have changed my site.

So if anyone has advice, or links to how they are made that would be great.

Trip he is looking at you!  Your links about GoLive, helped me make my site.  This is the new site!.  Maybe you can help again.

Matthew


----------



## twister (Mar 6, 2003)

Humm we do that at work.  Maybe i'll ask into it.


----------



## phatcactus (Mar 6, 2003)

That's just email text in HTML format.  A lot of people have image downloading turned off, however, because spammers read their server logs to see who downloads the emails as a way of verifying addresses.

If you use Mail.app (as your attachment suggests), check out Show> Raw Source under the view menu.

- Brian


----------



## profx (Mar 6, 2003)

i think you can just attach a single html file and send it, i believe that works, try sending one to your self!


----------



## TommyWillB (Mar 8, 2003)

> _Originally posted by phatcactus _
> *That's just email text in HTML format.  A lot of people have image downloading turned off, however, because spammers read their server logs to see who downloads the emails as a way of verifying addresses.
> 
> If you use Mail.app (as your attachment suggests), check out Show> Raw Source under the view menu.
> ...


Actually it is more complicated than that... In order to make an HTML email that also renders as plain text in not HTML email readers you need to do multi-part MIME email.

I have an example somewhere... Let me go look for it...


----------



## TommyWillB (Mar 8, 2003)

This is a snippet of ColdFusion code... However the process ought to be exactly the same for any other language. (I use this every year to send my family email Christmas cards. )

The main thing to notice is that you've got to include the "Content-Type" in the email header. (I have not done this in PHP yet, so I'm not sure how to do that.)

Secondly you need to define a "boundary" to seperate the seperate sections of the email. (I think the boundary can be anything unique, but to be safe I copied my from a bit of SPAM that I got.) The first section is plain text. The second section is HTML. You define these content types at the top of each section using the normal text/plain and text/html MIME types.

OH!... And don't put ANY line breaks or spaces at the top of the email... I added some here just so the code would fit in the browser windows. If you want to see how others do it, save a bit of SPAM mail and open it in a text editor.
	
	



```
<CFMAIL TO="recipient@something.com"
    FROM="sender@something.com"
    BCC="recipient@something.com, [email]recipient@something.com[/email]"
    SUBJECT="Text AND HTML email message"
    TYPE="HTML">
<CFMAILPARAM NAME="MIME-Version" VALUE="1.0">
<CFMAILPARAM NAME="Content-Type" 
		VALUE='[color=green]multipart/alternative[/color]; boundary="[color=red]----_=_NextPart_001_01C189AA.F74E2F60[/color]"'>  
This is a multi-part message in MIME format.

[color=red]------_=_NextPart_001_01C189AA.F74E2F60[/color]
Content-Type: [color=purple]text/plain[/color];
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

All,

This is the TEXT ONLY part of the email message.


Some text readers will ALSO show the HTML stuff, so you should always put HTML on the 
bottom... Also I tend to add a little note at the bottom of the text section to explain 
to these users that 
they can ignore the HTML "junk"...


This is a multi-format (MIME) email message delivered both as plain text and HTML. 

If you are seeing this, then your email client is not configured for rendering HTML.  

If you see anything below here, then you email client also is not able to seperate 
out the multiple MIME parts. Please ignore everything below here...

[color=red]------_=_NextPart_001_01C189AA.F74E2F60[/color]
Content-Type: [color=purple]text/html[/color];
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<h1>This is the HTML part of the email</h1>

<p>There are some tricks to make images work that I can't remember off the top of my 
head, but all of the normal HTML <b>[b]BOLD[/b]</b>, <font color=blue>[color=blue]COLOR[/color]</font> and other 
tags work as you'd expect.</p>

<p>The simple way to do images is to just include absolute path's to your server, but 
this has two problems:
<ol>
	<li>Not all email readers that handle HTML allow network connectivity... So your 
		images might break. (Use ALT tags!!!)
	<li>This will put a load on your email server it you are including a large 
		number of recipients...
</ol></p>

[color=red]------_=_NextPart_001_01C189AA.F74E2F60--[/color]
</cfmail>
```


----------



## phatcactus (Mar 8, 2003)

> _Originally posted by TommyWillB _
> *Actually it is more complicated than that...*


Ah, right you are.  I just tried it and got HTML text back.  Sad.  

Sorry for the misinformation.

- Brian


----------



## bootedbear (Mar 8, 2003)

Just in the interest of completeness, I'll point out that you don't actually have to send a multi-part message. You _could_ just send a single part with a context type of "text/html".

However, it is very common for messages to be sent as TommyWillB showed above, as the text-part can be displayed by mail clients that cannot deal with html (or have it disabled).

I highly recommend going the multi-part route.

hth,
bear


----------



## Inline_guy (Mar 9, 2003)

Does anyone know if you can make them and save them with GoLive?

Matthew


----------



## jeffharrell (Mar 12, 2003)

I do this at work with a program called "Direct Mail'. I found it on VersionTracker and it is shareware. It works pretty good. I do have a few complaints though. 

Here is the process:

I create the email in Dreamweaver / FileMaker Pro, open the HTML file in Direct Mail, import the addresses and hit send. One plus about OS X on this end is that it is running the program and using sendmail to send the emails out also.  

My 2 cents. It works for us at work and does not require the resources of our webserver to send out a load of emails. GoLive should work just as well.


----------



## bluehz (Mar 12, 2003)

DirectMail is the only Mac app I have ever had any luck with also.


----------

