

ID: 110
Viewed: 3554
Added: Apr 04, 2002
Version:



Snippet uploaded by: snippet
Written By: snippet
Demo: Sorry, no demo



Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty


A basic way to send email as html in perl. Can also be setup to read from a form.
<!---Head--->
$mail_prog = '/usr/sbin/sendmail' ;
$email = "your@address.com";
$to = "recipient@addrerss.com";
$subject = "emails subject";
$body = "<html><head></head><body>your text here</body></html>";
<!---Body--->
open(MAIL, "| $mail_prog -t") || &error("Could not send out emails");
print MAIL "To: $to n";
print MAIL "From: $email <$email>n";
print MAIL "Subject: $subjectn";
print MAIL "MIME-Version: 1.0n";
print MAIL "Content-Type: text/html;n";
print MAIL "Content-Transfer-Encoding: 7bitnn";
print MAIL "$body"; //your html starts here.
print MAIL "nn";
print MAIL "nn";
close (MAIL);
No Comments to show


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.