Jump to content

email links


ngreenwood6

Recommended Posts

I have set-up an email link to reset the users password. I have this code for the subject:

 

$message = "Please <a href='reset.php?email=$reset_email'>click here</a> to reset your password.";

 

It sends the email but the problem is that it doesnt show it as a link as click here. It just shows the code. Anyone know how to get it to show the link in an email?

Link to comment
https://forums.phpfreaks.com/topic/123515-email-links/
Share on other sites

  Quote

HTML requires double quotes. Replace the single quotes (') with double quotes ("). You will have to escape them (\") as they will be appearing within a double quote enclosed string.

 

That shouldn't be the problem.

 

Are you sending a header?

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

 

Then your mail function should look something like

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

Link to comment
https://forums.phpfreaks.com/topic/123515-email-links/#findComment-637877
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.