I'm stumped on this one. I want to send an HTML formatted email to a single user. I've included all the correct header info in the correct places (I think) but all we receive is a plain text email with all the html formatting.
Here's part of the code:
and this is what we receive:
I've worked all day on this trying make it work so I'm of the opinion now that there's something I'm not seeing.
The email client IS configured to read HTML email - we receive several of them every day.
I'd appreciate any help from you kind folks.
Thanks
Patrick
There's always a better way. The fun is trying to find it!
Here's part of the code:
Code:
#!/usr/bin/perl -w
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use Net::SMTP;
$smtp->mail( $email );
$smtp->to( $MailTo );
# Start the mail
$smtp->data();
$smtp->datasend("To: $MailTo\n");
$smtp->datasend("From: $email\n");
$smtp->datasend("Subject: Request for Quotation\n\n");
$smtp->datasend("MIME-Version: 1.0\n");
$smtp->datasend("Content-Transfer-Encoding: quoted-printable\n");
$smtp->datasend("Content-type: text/html; charset=ISO-8859-1\n\n");
$smtp->datasend("<html><body> $table1");
$smtp->datasend("<tr><td>Company Name</td><td> $company</td></tr>");
$smtp->datasend("<tr><td>Contact</td><td> $name</td></tr>");
.
.
.
$smtp->datasend("<tr><td></table>");
$smtp->datasend("</body></html>\n");
# Send the termination string
$smtp->dataend();
# Close the connection
$smtp->quit();
and this is what we receive:
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-type: text/html; charset=ISO-8859-1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><body> <table width="50%" border="1" cellpadding="0" cellspacing="0"><tr><td>Company Name</td><td> Fred Frick Co</td></tr><tr><td>Contact</td><td> Fred Frick</td></tr>
.
.
.
</table></body></html>
I've worked all day on this trying make it work so I'm of the opinion now that there's something I'm not seeing.
The email client IS configured to read HTML email - we receive several of them every day.
I'd appreciate any help from you kind folks.
Thanks
Patrick
There's always a better way. The fun is trying to find it!