This is used by msgHTML().Note - older versions of this function used a bundled advanced converter which was removed for license reasons in #232.Example usage: //Use default conversion
$plain = $mail->html2text($html);
//Use your own custom converter
$plain = $mail->html2text($html, function($html) {
$converter = new MyHtml2text($html);
return $converter->get_text();
});
Parameters
$htmlstring
The HTML text to convert
$advancedbool|callableoptional
Any boolean value to use the internal converter, or provide your own callable for custom conversion. <em>Never</em> pass user-supplied data into this parameterDefault: false
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/PHPMailer/PHPMailer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.