-
URL in Email *RESOLVED*
I've got a registration page on my site that's working fine and once the user fills in all the info an email is sent to them with a link which they need to click on to activate their account.
What i'm trying to do is have the link within the email to be displayed like on a webpage. eg. Click Here.
Click Here
I've tried the below but it sends exactly what i've posted and not a link that says Activate Account. Can this be done?
PHP Code:
<a href="http://www.mysite.com/ebook/index.php?substr=registration&ufname=Tiger&ulname=Woods&[email protected]&uicq=&uwsite=&uname=Tiger&upass=Woods">Active Account</a>
-
You need to send a content type header in your email like the following:
PHP Code:
mail ($to, $subject, $message, "MIME-Version: 1.0\r\nContent-Type: text/html");
-
Thanks visualAd.
I've now got the below which works but i've had to remove ""From: [email protected]" from the mail() code. Is there a way I can add it in as well as the headers code i've added?
PHP Code:
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($uemail, "ShareFinder E-Book - Confirmation Email", $body, $headers);
-
Just add it to the list of headers:
PHP Code:
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: [email][email protected][/email]"
mail($uemail, "ShareFinder E-Book - Confirmation Email", $body, $headers);
-
Thanks again visualAd, it now works the way i wanted :)