Jump to content

insert url link into email


cozzy1984

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>";

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.