Send link by Phpmailer

Asked

Viewed 228 times

0

I am trying to send an email confirmation of registration to a client using the Phpmailer. It turns out that the message is printed as below:

<strong>Você foi cadastrado no sistema de licitação da Terra Palmas.</strong>
Clique no link para confirmar seu e-mail:
<a href='/cliente/confirmar/'> /cliente/confirmar/</a>

Then the code used:

$mailTo->Body = "
    <strong>Você foi cadastrado no sistema de licitação da Terra Palmas.</strong>
    Clique no link para confirmar seu e-mail:
    <a href='{$link}'> /cliente/confirmar/</a>
";

Who can tell me what I’m doing wrong? I’ve done a lot of research and I can’t solve it.

1 answer

1

If you are using inside a <a></a>, for example, you must be sure that enabled the mode html. That means he will process your code html and print everything correctly. To do this, just use this option:

$mailTo->IsHTML(true);

That should solve your problem.

  • Thank you Celsom

Browser other questions tagged

You are not signed in. Login or sign up in order to post.