Send link via PHPMailer

0

I'm trying to send a registration confirmation email to a client using 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='http://pt.stackoverflow.com/cliente/confirmar/'> http://pt.stackoverflow.com/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}'> http://pt.stackoverflow.com/cliente/confirmar/</a>
";

Who can tell me what I'm doing wrong? I've researched a lot and I can not solve it.

    
asked by anonymous 14.02.2017 / 19:27

1 answer

1

If you are using within <a></a> , for example, you should be sure to enable html mode. This means that it will process your code html and print everything correctly. To do this, just use this option:

$mailTo->IsHTML(true);

This should solve your problem.

    
14.02.2017 / 19:30