Colin Johnstone wrote:

> HI all,
>  
> I need help sending HTML emails with sendmail have tried this
>  
> $from="foo\@bar.com";
> $to= shift; ## yes this is enclosed in a function and I pass the email address as a 
>parameter
> $subject="Latest News!";
> $sendmailpath="/usr/sbin/sendmail";
> 
> 
> open (SENDMAIL, "| $sendmailpath -t");


open SENDMAIL, "| $sendmailpath -t" or die "Could not open sendmail:$!";


> print SENDMAIL "Subject: $subject\n";
> print SENDMAIL "From: $from\n";
> print SENDMAIL "To: $to\n\n";

                            ^^

This empty line suggests sendmail that the message will start

(instead of the following header information).
Just remove it.


> print SENDMAIL <<END;
> MIME-Version: 1.0
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> <font color="#FF6666">ssssss</font>
> wibble
> </HTML>
> END
> 
> close (SENDMAIL);

Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to