Php mail help
Posted: Tue May 15, 2007 1:37 am
I have a php script which sends out an email over an action. The problem is, when I add hyperlinks, I cannot use "\n" to make new lines and therefore all the text comes out on one line.
I've tried the following code too but when I run the script all my text dissapears and only the link remains:
Code: Select all
<?
$to = "Someone <yourname@mysite.com>";
$subject = "You recieved a message!";
$headers = "From: Mysite <mysite@mysite.com>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Reply-To: Mysite <mysite@mysite.com>\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSmail-Priority: High\n";
$headers .= "X-mailer: My mailer";
//Content start
$message = "Thanks for your registration!\n";
$message = "___\n";
$message .= '<a href="http://www.mysite.com">www.mysite.com/editaccount.php?notifications</a>';
//Content end
mail ($to, $subject, $message, $headers)
?>Code: Select all
$message = '<a href="http://www.myurl.com">Link</a>';