whats the skinny on html in email?
Hello, just trying to put html in an email so it will read my href link. Its sending to the email but its showing all this as is instead of reading the html code. Anyone see whats wrong with this html email php? Thanks very much.
$validateemail = 'email@example.com ;
$from = 'noreplysupportaddress';
$subject = "Email validation" ;
$messageproper = "<html>
<div><span style='font-family:arial,sans-serif;font-size:14px'>Testing text and html in an email.<a href='http:www.example.com/validate.php?username=$username
' target='blank'>Validate Your Email</a></span></div>
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers = "From: <$from>\r\n";
$headers .= "Reply-To: ".preg_replace('/[rn]+/', ' ', $from)."\r\n";
mail($validateemail, $subject, $messageproper, $headers);
Last edited by vortexer; 08-12-2007 at 04:26 AM.
Don't know if this would be causing the problem you are seeing, but you left out the "//" after the "http:" in the link tag.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Thanks. no its not that I just did that for this forum to keep the url tags off of it. Anyone know how put html in an email? Thanks.
I got it, I was missing the periods after some of the $headers
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)