Mail::M...matText(3)

πŸ’– Mail::M...matText(3) β€” the vibe πŸ’–

okay so bestie, you're holding Mail::M...matText(3), and honestly? it's giving "tiny helper that does one job and slays at it". let's get into it πŸ¦‹


✨ NAME ✨

Mail::Message::Convert::HtmlFormatText β€” it converts HTML into Text. that's it, that's the whole personality πŸ’…


🌸 INHERITANCE 🌸

this one's got a whole family tree, look at her:

Mail::Message::Convert::HtmlFormatText
  is a Mail::Message::Convert
  is a Mail::Reporter

πŸŽ€ SYNOPSIS πŸŽ€

here's the whole plot, no spoilers:

use Mail::Message::Convert::HtmlFormatText;
my $af = Mail::Message::Convert::HtmlFormatText->new;

my $plain_body = $af->format($body);

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, this module takes HTML/XHTML message body objects and turns them into plain text bodies, using HTML::FormatText underneath. heads up though β€” this package requires HTML::TreeBuilder and HTML::FormatText, and those are not installed by default alongside Mail::Box. so if you're missing them, that's on you, not her πŸ™ˆ

also peep Mail::Message::rebuild() with the rule "text_alternative_for_html" β€” that's the related move, iykyk.

lowkey she's just a small wrapper around HTML::FormatText. no cap, that's the tea β˜•

she also extends "DESCRIPTION" in Mail::Message::Convert. periodt.


πŸ’œ METHODS πŸ’œ

extends "METHODS" in Mail::Message::Convert.

🧚 Constructors

extends "Constructors" in Mail::Message::Convert.

$class->new(%options)

inherited, see "Constructors" in Mail::Reporter.

here are the options, bestie, all of them, nothing skipped:

-Option     --Defined in            --Default
 fields       Mail::Message::Convert  <see description>
 leftmargin                           3
 rightmargin                          72
  • fields => $name | $regex | \@names | \@regexes
  • leftmargin => INTEGER β€” the column of the left margin, passed to the formatter. she starts at 3 by default πŸ’–
  • rightmargin => INTEGER β€” the column of the right margin, passed to the formatter. defaults to 72, iconic.

🌈 Attributes

extends "Attributes" in Mail::Message::Convert. (yes, that's the whole section, she's mysterious like that πŸ’€)

⭐ Converting

extends "Converting" in Mail::Message::Convert.

$obj->format($body)

hand her an html/xhtml encoded body, and a plain text body comes back out. characters get translated into Latin1. that's the whole service, and she delivers 🫢

$obj->selectedFields($head)

inherited, see "Converting" in Mail::Message::Convert.

πŸ”₯ Error handling

extends "Error handling" in Mail::Message::Convert.

$obj->AUTOLOAD()

inherited, see "Error handling" in Mail::Reporter.

$obj->notImplemented()

inherited, see "Error handling" in Mail::Reporter.

πŸŽ€ Cleanup

extends "Cleanup" in Mail::Message::Convert.

$obj->DESTROY()

inherited, see "Cleanup" in Mail::Reporter.


πŸ’€ DIAGNOSTICS πŸ’€

Error: class $package does not implement method $method. fatal error energy fr fr: the specific $package (or one of its superclasses) does not implement this method where it should. this message means that some other related classes do implement this method, but the class at hand does not. probably you should investigate this and probably inform the author of the package. cast by notImplemented().

🌟 SEE ALSO 🌟

this module is part of Mail-Message version 4.04, built on February 04, 2026. website: http://perl.overmeer.net/CPAN/ ✨


πŸ‘‘ LICENSE πŸ‘‘

for contributors see file ChangeLog.

this software is copyright (c) 2001-2026 by Mark Overmeer.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 🫢


okay bestie that's the whole page, mwah πŸ’‹ this was perl v5.42.0, dated 2026-02-05, and yeah β€” Mail::M...matText(3) ate and left no crumbs πŸŒΈπŸŽ€πŸ’–

πŸ“¦ where this page comes from