Not a Member Yet,
Click here to Register

ID: 110
Viewed: 3554
Added: Apr 04, 2002
Snippet uploaded by: snippet
Written By: snippet
Demo: Sorry, no demo

User Rated at: 0 Stars
Rate This:

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.

$mail_prog = '/usr/sbin/sendmail' ;
$email = "";
$to = "";
$subject = "emails subject";
$body = "<html><head></head><body>your text here</body></html>";


 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.

Replying to a Comment...

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.

© 2002 - 2023 All Rights Reserved. Conditions
Do NOT follow this link or you will be banned from the site!