View Full Version : Html Mail By Perl
quantumpixel
09-11-2002, 10:26 PM
im new at this perl thing... need help asap...
i want to send html mail through perl...
i heard u need to add the
print MAIL "Content-type: text/html\n\n";
tag but i cant get it to work...
can anyone help please !?!?!?!
i have the print "Content-type: text/html\n\n"; on top also for the html displayed on the page...
Hello,
nope this is not correct..
actually you have to write something like this:
$MailProgram = '/usr/sbin/sendmail -t';
open MAIL,"|$MailProgram";
print MAIL <<TO_END;
To: $To
From: $From
Subject: $Subject
Content-Type: Text/Plain; Charset="US-ASCII"
$Message
TO_END
close MAIL;
pay attention to $MailProgram - this variable contain path to sendmail program under linux - you must know or ask hosting provider for it's original location - without it the whole thing will not work. $To variable will contain the user e-mail to whom this mail is. $From - from who e-mail is, $Subject - the subject of message.. also pay attention to Charset - if you need different encoding - you must specify it here. $Message - contain the whole message.
thats it, hope this will help you
quantumpixel
09-12-2002, 03:48 AM
thanks alot ot... it worked out perfect !!!:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.