Link to home
Start Free TrialLog in
Avatar of jpchen
jpchen

asked on

email html format

How can I send the HTML format in the email?
Avatar of Kenny
Kenny
Flag of Malaysia image

Use MS Outlook and choose "always send to this recipient in rich text format".

I think Outlook express also can do it.

This function works for most UNIX systems:


############################################################
# Sending mail function
# Parameters:
#  send_mail( recipient, mail from, subject, message content);
############################################################
sub send_mail()
{
   local($to, $from, $subj, $html_content) = @_;

   open(MAIL,"|/usr/lib/sendmail -t");

   print MAIL "To: $to\n";
   print MAIL "From: $from\n";
   print MAIL "Content-type: text/html\n";
   print MAIL "Subject: $subj\n\n";

   print MAIL "$html_content";

   close (MAIL);
}
ASKER CERTIFIED SOLUTION
Avatar of guadalupe
guadalupe

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
Avatar of guadalupe
guadalupe

To finish, I this necessary because, as you will notice, the source in the end is not just simple html  Links, Sources, Accents and many other things have their own little oddities like the '3D' for links.  I have yet to find a modual that does the coding for you and sendmail doesn't seem to do it either so... here's the long answer.  Just reject it if you find something simpler that works (and let me know for the next time).