Link to home
Start Free TrialLog in
Avatar of howesd
howesd

asked on

Format E-Mail as HTML

Is anyone aware of a tool which will allow me to format Unix Mail as html? I need to be able to deliver mail in a browser ( ala Hotmail ).

Avatar of chris_calabrese
chris_calabrese

First, there are already a bunch of commercial systems that do this.

Meanwhile, the easiest way to do this is just put each mail into a text file and blast it out.  You won't get formatting of embedded tags or proper MIME attachments, but you won't get the security headaches that go with them either.

Doing a simple HTML conversion would be easy in a shell script, but getting MIME attachments right sounds very difficult.
Avatar of howesd

ASKER

That's backing up what I thought I suppose .... do you have any recommendations of commercial systems?
ASKER CERTIFIED SOLUTION
Avatar of chris_calabrese
chris_calabrese

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
IF YOU WISH TO USE PHP AND SENDMAIL IT SHOULD LOOK LIKE THIS AT THE BEGINING:


$message = "<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN><html><head><title>Hawaii Document</title><META http-equiv=Content-Type content='text/html; charset=iso-8859-1'></head><body><center><img src = http://205.51.189.94/hgvc/email/eskimo.gif
 width = 400px height = 140px></center>\r\n<br>";

YOUR TEXT MESSAGE HERE:
$message .= "Your text message";

YOUR FROM LIKE THIS:
$from = "From: someone@somewhere.org\r\n Content-Type: text/html; charset = iso-8859-1\r\n"

YOUR DESTINATION LIKE THIS:

$to = "joebob@joebob.com";

YOUR SUBJECT LIKE THIS:
$sub = "enlarge a body part";

SEND IT LIKE THIS:
mail($to, $sub, $message, $from);

BEWARE 1--IF YOU HAVE A LOT OF TEXT ADD '\r\n' IN FRONT OF ANY '<br>' OR ELSE MS IE WILL RANDOMLY PLACE AN '!' SOMEWHERE IN YOUR TEXT WHEN SOMEONE VIEWS YOUR MESSAGE.

BEWARE 2--HOTMAIL(S**KS) HOTMAIL WILL RECJECT YOUR MESSAGE IF A BUTTERFLY FLAPS IT'S WINGS IN BRAZIL. I MYSELF FIND THIS EXTREMELY FRUSTRATING I HAVE A LIST OF 2500 CUSTOMERS AND HAVE OFTEN HAD HOTMAIL SIMPLY DROP A MESSAGE NO BOUNCE BACK NO NOTICE. IF YOU HAVE A RELATIVELY SMALL AMOUNT OF HOTMAIL ADDRESSES TO COVER YOU CAN BUILD AN ARRAY OF OUTLOOK MESSAGE ID'S BY EMAILING TO YOURSELF AND COPYING TO YOUR EMAIL RPOGRAM THIS WILL HELP FAKE OUT THEIR SPAM FILTERS AS THEY SEEM TO LIKE MESSAGES FROM OUTLOOK, I WONDER WHY?