Trying to send a html email - not working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
doggy
Forum Commoner
Posts: 80
Joined: Tue Dec 09, 2003 5:01 am
Location: South Africa

Trying to send a html email - not working

Post by doggy »

<?php
$to = "email@youremai.com";
$subject = "sub";
$from = "Atlas";
$msg = "<body bgcolor=\"#D6E2F5\" text=\"#000099\" link=\"#000099\" vlink=\"#000099\" alink=\"#000099\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">"
."<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"
."<tr> "
."<td height=\"91\" colspan=\"2\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"../../../../FoxServ/www/Atlas-web/images/ban-1.gif\">"
."<tr> "
."<td width=\"519\" height=\"91\">&nbsp;</td>"
."<td width=\"267\" valign=\"top\"><div align=\"right\"><img src=\"../../../../FoxServ/www/Atlas-web/images/xmas-logo.gif\" width=\"301\" height=\"91\"></div></td>"
."</tr>"
."</table></td>"
."</tr>"
."<tr> "
."<td width=\"1\" height=\"19\">&nbsp;</td>"
."<td width=\"100%\">&nbsp;</td>"
."</tr><tr>"
."<td height=\"350\">&nbsp;</td>"
."<td valign=\"top\"><div align=\"center\"> "
."<p>hello</p>"
."</div></td>"
."</tr>"
."</table>";
mail($to, $subject, $msg, "From: $from\nX-Mailer: PHP/" . phpversion());

?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you're right. That doesn't work.
Is there any question related to this post?
User avatar
aquila125
Forum Commoner
Posts: 96
Joined: Tue Dec 09, 2003 10:39 am
Location: Belgium

Post by aquila125 »

phpmailer is your friend
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Post Reply