html - Create Clickable verification link PHP mail -
for email verification, creating hash each user , sending verification email user.the message body given below.
$message_body = ' hello '.$first_name.', thank signing up! please click link activate account: http://www.alphaktu.co.in/verify.php?email='.$email.'&hash='.$hash ;
but want convert verification link clickable link.
for starters, might want use html links within email body, this:
$message_body = ' hello '.$first_name.', thank signing up! please click link activate account: <a href="http://www.alphaktu.co.in/verify.php?email='.$email.'&hash='.$hash.'"> verification link </a>' ;
secondly, work, need use html mime type when setting headers email. if haven't, this:
// set content-type when sending html email $headers = "mime-version: 1.0" . "\r\n"; $headers .= "content-type:text/html;charset=utf-8" . "\r\n";
this tells browser interpret html code message body actual html, , not plain text.
Comments
Post a Comment