A
amerar
Hi,
I have a Perl script which sends out emails for us. I want to change
it such that it sends out both a text portion and an HTML portion.
display.
I have pasted my code below. I am testing with Netscape Messenger.
And, no matter what, it always displays both text & html.
Maybe someone can see if I've made some errors or something....
Thanks in advance.
$smtp->datasend("From: $from1\n");
$smtp->datasend("Reply-To: $replyto\n");
$smtp->datasend("To: $email\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("Mime-Version: 1.0\n");
$smtp->datasend("Content-Type: multipart/mixed;\n");
$smtp->datasend(" boundary=\"theBoundary\"\n\n");
$smtp->datasend("\n\n");
$smtp->datasend("--theBoundary\n");
$smtp->datasend("Content-Type: text/plain; charset=us-ascii\n\n");
foreach $line (@text_letter) {
$smtp->datasend("$line\n");
}
$smtp->datasend("\n\n");
$smtp->datasend("--theBoundary\n");
$smtp->datasend("Content-Type: text/html; charset=us-ascii\n\n");
foreach $line (@html_letter) {
$smtp->datasend("$line\n");
}
$smtp->datasend("\n--theBoundary--\n");
Arthur
I have a Perl script which sends out emails for us. I want to change
it such that it sends out both a text portion and an HTML portion.
boundary tagbs, the email client will decide which is the best toFrom what I have read, with a multipart/mixed header and the proper
display.
I have pasted my code below. I am testing with Netscape Messenger.
And, no matter what, it always displays both text & html.
Maybe someone can see if I've made some errors or something....
Thanks in advance.
$smtp->datasend("From: $from1\n");
$smtp->datasend("Reply-To: $replyto\n");
$smtp->datasend("To: $email\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("Mime-Version: 1.0\n");
$smtp->datasend("Content-Type: multipart/mixed;\n");
$smtp->datasend(" boundary=\"theBoundary\"\n\n");
$smtp->datasend("\n\n");
$smtp->datasend("--theBoundary\n");
$smtp->datasend("Content-Type: text/plain; charset=us-ascii\n\n");
foreach $line (@text_letter) {
$smtp->datasend("$line\n");
}
$smtp->datasend("\n\n");
$smtp->datasend("--theBoundary\n");
$smtp->datasend("Content-Type: text/html; charset=us-ascii\n\n");
foreach $line (@html_letter) {
$smtp->datasend("$line\n");
}
$smtp->datasend("\n--theBoundary--\n");
Arthur