E-mail Submission by PHP Mailer

Asked

Viewed 31 times

-2

I am using PHP Mailer for sending email, in Outlook appears the title and subject correctly, but where it is underlined in red appears part of the HTML code that makes up the body of the email, I would like it to appear in the same way as the message highlighted in green.

I’ve searched a lot trying to find something, but nothing, I don’t know if it’s the way I’m looking, but it’s taken me a long time.

inserir a descrição da imagem aqui

The way I send the email is like this:

<?php

// Include PHP Mailer e Configurações

$mail->setFrom("FROM", "NAME_FROM");
$mail->addAddress("EMAIL", "NOME");
$mail->isHTML(true);
$subject = "ASSUNTO";
$mail->Subject = $subject;
$mail->Body = "HTML";
$mail->send();
$mail->ClearAddresses();

?>

Thanks in advance.

  • 1

    There is nothing HTML where it is marked in red... Add in your question the value you assign to $mail->Body.

  • If you look at the end where you have <https://www.yeb.com.br etc...> this tag is a link that was probably modified by Outlook to appear this way

1 answer

0


Solved the problem...

Outlook needs a special tag for this text, hopefully it helps someone.

<!--*|IF:MC_PREVIEW_TEXT|*-->
<!--[if !gte mso 9]>
<!---->
<span class="resumo" style="display:none; font-size:0px; line-height:0px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; visibility:hidden; mso-hide:all;">TEXTO AQUI</span>
<!--<![endif]-->
<!--*|END:IF|*-->

Browser other questions tagged

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