Jump to content

PHP simple mail query


promotec

Recommended Posts

Hi guys a simple php mail question, I am using the following mail routine to send a email from a script, its all working just fine

except the <a href="">Click Here to View</a> is showing the code on the resulting email not just the hyperlinked Click Here to View.

heres my code below I tried swapping content type header from text/html to multipart/alternative that didn't make any difference, any suggestion would be very helpful.

 

 

 

$to = "$email";

$subject = "$name Your Free Reading From ClairVision Network";

 

//headers and subject

$headers = "MIME-Version: 1.0\r\n";

$headers = "Content-type: multipart/alternative charset=iso-8859-1\r\n";

$headers = "From: \"ClairVision Network\" <\"[email protected]\">\r\n";

 

$body = "ClairVision Free Reading Request\n\n";

$body .= "Hello ".$name." Thankyou for requesting a free reading from ClairVision Network.\n\n";

$body .= "Your free reading has been done by ".$reader." who is one of our resident clairvoyants.\n\n";

$body .= "View ".$reader."'s public profile page:\n\n

<a href=http://clairvision.net/index.php?page=user&action=pub_profile&id=$readerid>Click Here to View</a>

\n\n";

 

$body .= "Here is the question you have asked:\n \n".$question."\n\n";

$body .= "Here is the answer to your question:\n \n".$answer."\n\n";

$body .= "Thankyou for visiting ClairVision Network\n\n";

$body .= "Kind regards ".$reader."\n\n";

 

 

mail($to, $subject, $body, $headers);

 

 

Kind regards Chris

Link to comment
https://forums.phpfreaks.com/topic/278657-php-simple-mail-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.