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
Help with PHP E-mail
Moderator: General Moderators
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
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);
?>my somewhat formulaic answer is: http://phpmailer.sourceforge.net 
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); ?>
-
Think-Digitally
- Forum Commoner
- Posts: 25
- Joined: Wed Feb 04, 2004 2:25 pm
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
it would be a URL (http://whatever.com/image.jpg) to the image