Gossamer Forum
Home : General : Perl Programming :

Sending HTML in e-mails...

Quote Reply
Sending HTML in e-mails...
Hi. I was just wondering if someone could tell me how to send HTML as an e-mail (e.g with hyperlinks, images etc).

Thanks Cool

A.J.Newby
webmaster@ace-installer.com
http://www.ace-installer.com

Quote Reply
Re: Sending HTML in e-mails... In reply to
Hello,
If you would have search the forum for 'HTML mailing' than you would have come across a post by 'noguru' which contained the following..............

All you need to do is put some extra lines in your header when you create the mail.

From: Your Name <you@YourDomain.com>
To: Recipient Name <them@Theirs.com>
Subject: test message
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="filename.html"
Content-Base: http://www.YourDomain.com

Just remember that everyone doesn't have an html based mail client, and that AOL mail is
different that other clients. You need to have them check which client they use and send the
appropriate mail format.


Best Regs
JackofNone

Quote Reply
Re: Sending HTML in e-mails... In reply to
What is this bit?

Content-Disposition: inline; filename="filename.html"
Content-Base: http://www.YourDomain.com

Do i need to change this to my sites address and the URL of the HTML i am sending? Isn't there a way i can send just PURE HTML and then at the other end it comes out as a page, not code?

Andy

Quote Reply
Re: Sending HTML in e-mails... In reply to
You can leave out those two lines - the important part is the "Content-type: ..." line, then just use HTML and (assuming the recepient has an HTML e-mail client) they will see your e-mail as intended.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: Sending HTML in e-mails... In reply to
Heres an article I found that might help you.

http://tlc.perlarchive.com/0004/03.shtml

Quote Reply
Re: Sending HTML in e-mails... In reply to
Thanks. It looks great....

Andy

Quote Reply
Re: Sending HTML in e-mails... In reply to
In Reply To:
(assuming the recepient has an HTML e-mail client)
That's the only thing that stops me from sending out email in html....I mean I have so many users on my mailing list that are from aol. I think the new version of aol reads html in the mail, but what about all the users that can't read it...aren't they going to just see a text page of html?? I think I remember reading a way to have your html version only go to clients that accept it, and the ones that don't get the plain text version.......that is, without them having to select if they can receive html or not. Anyone know how to do this?