SDKiller / zyx-phpmailer

PHPMailer integration for Yii2 framework
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 71 #12

Closed Blackout8099 closed 6 years ago

Blackout8099 commented 7 years ago

I have done a clean install and recieved DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 71

any ideas??

SDKiller commented 7 years ago

This error is produced by Html2Text which is used to convert html to text (for example for message altBody).

As it relies on DOMDocument - it probably expects that html passed should be valid.

If you cannot ensure this - you may disable Html2Text and PHPMailer simple conversion function html2text() will be used https://github.com/PHPMailer/PHPMailer/blob/master/class.phpmailer.php#L3418

To do so add to your mailer config:

    `html2textHandler` => false,
Blackout8099 commented 7 years ago

Ahh I see now, seem so obvious now :)

I resolved all my issuses by merging both fixes from dev-master and stable. Not had an issue sinces. Except from when I update composer of course.

logig commented 7 years ago

libxml_use_internal_errors(true)