in reply to Sending HTML-formatted mail to a list
This looks rather strange:
open( MAIL,"|$mailprogram -t" ) or die "Can't open sendmail! ($!)"; foreach (@address) { $from = $q->param( 'mail_from' || '' ); $subject = $q->param( 'mail_subject' || '' ); $message = $q->param( 'html_message' || '' ); $headers = "Content-Type: text/html; charset=iso-8859-1\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Transfer-Encoding: 7bit\r\n"; print MAIL "To: $_\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n"; print MAIL '$headers'; print MAIL '$message'; } return close(MAIL);
I think you meant :
foreach (@address) { open MAIL,"|$mailprogram -t" or die "Can't open sendmail! ($!)"; $from = $q->param( 'mail_from' || '' ); $subject = $q->param( 'mail_subject' || '' ); $message = $q->param( 'html_message' || '' ); $headers = "Content-Type: text/html; charset=iso-8859-1\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Transfer-Encoding: 7bit\r\n"; print MAIL "To: $_\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n"; print MAIL '$headers'; print MAIL '$message'; close MAIL; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sending HTML-formatted mail to a list
by abully (Novice) on Dec 16, 2001 at 21:04 UTC | |
by dvergin (Monsignor) on Dec 17, 2001 at 04:03 UTC | |
by abully (Novice) on Dec 17, 2001 at 11:45 UTC | |
by Chady (Priest) on Dec 16, 2001 at 23:20 UTC |