Help with PHP E-mail
Posted: Sat May 22, 2004 5:19 am
Hi, how can you put graphics, like a header in an e-mail. I hear that most e-mail facilites use different scripting. Is there anyway you can use a php include?
thanks
thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
$to = "email@domain.com";
$title = "Nice looking email";
$content = "<html><body><img src="server.com/pic.jpg" />Some text<br />More text..</body></html>";
$headers = "From: email@yourdomain.com";
mail($to,$title,$content,$headers);
?>Actually, 7-bit encoding can be handy with HTML, header content-type is another important issue...LiLpunkSkateR wrote:As long as they accept HTML in emails,Code: Select all
<?php $to = "email@domain.com"; $title = "Nice looking email"; $content = "<html><body><img src="server.com/pic.jpg" />Some text<br />More text..</body></html>"; $headers = "From: email@yourdomain.com"; mail($to,$title,$content,$headers); ?>