Skip to content
Advertisement

htmlentities ignores when using PHPmailer

Some times ago I made a contact form to send email.

I had this:

JavaScript

And that worked fine. After I read that although I don’t plan to send thousands of Newletters it would be better to use PHPmailer else it could be seen as spam and be blocked. I don’t understand much about those mailing things. So I read a tutorial and it works just fine but for one thing: htmlentities doesn’t do the job anymore and all <br> are ignored at reception.

I checked that : $mail->IsHTML(true);

Help would be greatly appreciated.

Here is the code using PHPMailer:

JavaScript

Advertisement

Answer

I hadn’t understood the use of IsHTML. In this case it had to be set to false.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement