PHPMailer\PHPMailer\PHPMailer::html2text
Convert an HTML string into plain text.
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: ```php // 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(); }); ```
Signature
public function html2text(string
$html,
[boolean
$advanced = false] )
Parameters
$html
— string- The HTML text to convert
$advanced
— boolean- Any boolean value to use the internal converter,
or provide your own callable for custom conversion
Returns
- string