1

how can I send an email using PHP that has a hyperlink which uses PHP variables?

The issue I am having now is that the HTML code is coming through the email but the link is still not clickable.

This is not a duplicate of this because I am sending a hyperlink and simply adjusting the headers didn't fix the issue.

Here is the code I have so far:

$to      = $EMAIL;
$subject = $the_subject;
$message = 

'text <a href="'.$URL.'">'.$PRODUCT.'</a> test' . $PRICE_TARGET . ' text ' . $PRICE . ';

$headers = 'From: x@x.com' . "\r\n" .
     'Reply-To: x@x.com' . "\r\n" .
     'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
Community
  • 1
  • 1
AAA
  • 2,388
  • 9
  • 32
  • 47
  • Found a solution: example 4 posted here http://php.net/manual/en/function.mail.php – AAA Mar 30 '15 at 00:00

0 Answers0