hi all,
I want to send a html page through email using SMTP. when i send the mail normally it is displaying the page as a plain text (i.e it is displaying the tags also).
But I want it to be displayed as a html page, How can i achieve it ?
I am using linux platform, and the code I am using for sending mails is
use Net:MTP;
$server='192.168.36.200';
$smtp = Net:MTP->new($server,Debug=>1,port=>25) or print "Error cannot connect to mail server";
$smtp->mail('[email protected]');
$smtp->to('[email protected]');
$smtp->data();
$smtp->datasend("To: Vardhman\n");
$smtp->datasend("Subject: Sent from Psearch\n");
$smtp->datasend("Content-Type:TEXT/HTML\n");
$smtp->datasend("\n");
$smtp->datasend("<html><head>A simple test message</head><body><hr><h1>simple test program</h1></body></html>");
$smtp->dataend();
$smtp->quit;
I tried changing the content-type but i didn't succeed, Any help plsssssssss
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).