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 been removed for license reasons in #232 Example usage: <code> // 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(); }); </code>
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
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
3526 | 155 | warning | Line exceeds 120 characters; contains 155 characters |