andibakker Posted November 9, 2009 Share Posted November 9, 2009 I have got a $message variable that contains an anchor. If I echo the message, it displays the anchor correctly, but if I send the mail, it displays incorrectly. Below is my code: $message = "Dear $username, \n\n blah blah blah ." . '<a href="http://localhost:81/unsubscribe.php?id=' . $loginid . '">Unsubscribe Here</a>'; echo "$message"; $headers = 'From: [email protected]'; $subject = "Reminder"; $toaddress = $email; //send the email mail($toaddress, $subject, $message, $headers); This displays from the echo correctly BUT the email that is sent looks like this : Dear Andi, blah blah blah .<a href="http://localhost:81/unsubscribe.php?id=1">Unsubscribe Here</a> How must I embed this in the $message ? Thanks Andi Link to comment https://forums.phpfreaks.com/topic/180860-anchor-embedded-in-php-mail-message/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.