promotec Posted June 1, 2013 Share Posted June 1, 2013 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\" <\"firstname.lastname@example.org\">\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 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.