Jump to content

Recommended Posts

Hi there, just managed to get a email activation working although the only problem i'm having is actually displaying the url link in the email. It is only outputting it as text and not a clickable link. Know this is probably really simple but, would really appreciate if someone could show me how to.

 

My code is:

$mail->Body = "Your account has been successfully created with the following details:\n\nUsername: $username\nPassword: $password\nEmail: $email\nForename: $forename\nSurname: $surname\nLocation: $location\n\nPlease click on the link to activate your account.\n<a href'http://localhost/Ad'll%20Do/activate.php?username=$username&&do=$active_code'>Activate Account</a>";

Link to comment
https://forums.phpfreaks.com/topic/90686-insert-url-link-into-email/
Share on other sites

 

Sorry, i do have the = but it doesn't work with it. How do u change the type to text/html asch?

 

I have:

$mail = new PHPGMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = 'ssl://smtp.gmail.com'; // SMTP servers
$mail->Username = '*****@gmail.com';
$mail->Password = '******';
$mail->From = '*****@gmail.com';
$mail->FromName = 'test';
$mail->Subject = 'test Registration';
$mail->AddAddress($email);
$mail->Body = "Your account has been successfully created with the following details:\n\nUsername: $username\nPassword: $password\nEmail: $email\nForename: $forename\nSurname: $surname\nLocation: $location\n\nPlease click on the link to activate your account.\n";
$mail->Body .= "<a href='http://localhost/Ad'll%20Do/activate.php?username=$username&&do=$active_code'>Activate Account</a>";

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.