iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-19-2005, 01:06 PM
WebProWorld Pro
 
Join Date: Aug 2004
Location: Maryland
Posts: 219
webmasterjunkie RepRank 0
Default PHP HTML mail Problem

I have the code below, and by all my knowledge it should work, but it doesn't. Does anyone have any help that could get this worked out for me.
Code:
<?
if (!isset($_GET['username'])) {
	$email_to = "cris@cris-griffith.com";
	$email_to_name = "Casper";
	header("Location: http://eastcoastassassins.com/email/index.php?username=$email_to_name&useremail=$email_to");
} else {
	$username = $_GET['username'];
	$useremail = $_GET['useremail'];
	$to = $useremail;
	$date = date("F");
	$subject = "SOCOM 3 Newsletter for $date";
	$message = "
<html>
<head>
<title></title>
</head>
<body>
<font style=\"font-family:tahoma, arial, verdana;font-size:10pt\">$username,


Thank you for subscribing.</p>


Best Regards,</p>


The Management Team

http://www.eastcoastassassins.com
</font>
</body>
</html>";
	$headers  = "MIME-Version: 1.0\r\n";
	$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
	$headers .= "From: Newsletter Bot <newsletter@eastcoastassassins.com>\r\n";
	mail($to, $subject, $message, $headers);
}
?>
This is what the email looks like when I get it.
Code:
Content-type: text/html; charset=iso-8859-1

From: Newsletter Bot <newsletter@eastcoastassassins.com>



<html>
<head>
<title></title>
</head>
<body>
<font style="font-family:tahoma, arial, verdana;font-size:10pt">Casper,


Thank you for subscribing.</p>


Best Regards,</p>


The Management Team

http://www.eastcoastassassins.com
</font>
</body>
</html>
Reply With Quote
  #2 (permalink)  
Old 10-19-2005, 05:16 PM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default

There's a couple of articles which should get you going:

http://www.zend.com/zend/trick/html-email.php
http://www.zend.com/zend/spotlight/s...emailpart1.php
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:31 AM.



Search Engine Optimization by vBSEO 3.3.0