Posted by: Anil Kumar Panigrahi in: ● September 16, 2009
Hi,
The following code will work, this functionality is use the external html content as email body.
$mail = new PHPMailer(); $mail->IsMail(); $mail->Timeout = 360; $mail->From = ""; $mail->FromName = ""; $mail->AddReplyTo(“”); $mail->AddAddress($Email); $mail->IsHTML(true); $mail->Subject = "Html as email"; $file = fopen("email.html","r"); $str=fread($file,filesize("email.html")); $str = trim($str); fclose($file); $mail->Body = $str; $mail->Send();
Then it will send the external html file as email body.
But be sure that in the html file all images should be full path. like:
http://www.domain.com/images/<image name>
It will be helpful.
Thank you,
1 | JimmyBean
1 de October de 2009 to ● 8:08 am
I don’t know If I said it already but …I’m so glad I found this site…Keep up the good work I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog. Thanks,
A definite great read..Jim Bean
2 | BloggerDude
9 de October de 2009 to ● 2:21 am
I don’t know If I said it already but …I’m so glad I found this site…Keep up the good work I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog. Thanks,
A definite great read….
Comments