How can I send an html email with perl?
Posted
by alexBrand
on Stack Overflow
See other posts from Stack Overflow
or by alexBrand
Published on 2010-04-12T16:32:35Z
Indexed on
2010/04/12
16:43 UTC
Read the original article
Hit count: 198
I am trying to send an HTML email using perl.
open(MAIL,"|/usr/sbin/sendmail -t");
## Mail Header
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
## Mail Body
print MAIL "Content-Type: text/html; charset=ISO-8859-1\n\n<html><head></head><body>@emailBody";
close(MAIL)
Is that the correct way of doing it? It is not working for some reason. Thanks for your help.
© Stack Overflow or respective owner