Mailmun...erplate(3)

πŸ“¦ version 3.20, in alpine 3.24

πŸ’– NAME πŸ’–

okay so bestie, this page is for Mailmunge::Action::Boilerplate β€” the one showing up as Mailmun...erplate(3) β€” and it's from User Contributed Perl Documentation. It's giving Add boilerplate to text parts of a message energy. πŸŽ€

🌸 ABSTRACT 🌸

This class implements methods that let you add boilerplate text to the beginning or end of text/plain or text/html parts. Literally that's the whole abstract, and it ate. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

package MyFilter;
use base qw(Mailmunge::Filter);
use Mailmunge::Action::Boilerplate;

sub filter_message {
    my ($self, $ctx) = @_;
    my $action = Mailmunge::Action::Boilerplate->new($self);

    $action->add_text_boilerplate($ctx, $ctx->mime_entity,
                                  "\nAnnoying plain-text boilerplate\n");
    $action->add_html_boilerplate($ctx, $ctx->mime_entity,
                                  "\n<p><b>Really</b> annoying HTML boilerplate</p>\n");
}

my $filter = MyFilter->new();
$filter->run();

1;

πŸ‘‘ METHODS πŸ‘‘

πŸ’… Mailmunge::Action::Boilerplate->new($filter);

Constructor. Typically used within a filter file as follows:

my $action = Mailmunge::Action::Boilerplate->new($self);

🧚 add_text_boilerplate($ctx, $entity, $text, $at_start, $all)

  • $entity must be the top-level MIME entity; typically, you would pass "$ctx->entity" as the $entity argument.
  • $text is plain-text boilerplate.
  • If $at_start is true, then the boilerplate is added at the beginning of the text/plain part(s). If false or omitted, the boilerplate is added at the end.
  • If $all is true, then the boilerplate is added to all text/plain parts in the message. If false or omitted, the boilerplate is added only to the first text/plain part.
🚨 Note that you may need to include newlines liberally in $text for best results.

🌈 add_html_boilerplate($ctx, $entity, $html, $at_start, $all)

  • $entity must be the top-level MIME entity; typically, you would pass "$ctx->entity" as the $entity argument.
  • $html is plain-text boilerplate.
  • $at_start and $all have the same meanings as in "add_text_boilerplate", but they apply to text/html parts rather than text/plain parts.
  • This function adds $html boilerplate to the start or end of one or all of the "text/html" parts in the message, depending on the values of $at_start and $all.

🌟 AUTHOR 🌟

Dianne Skoll <dianne@skollsoft.com> β€” icon. 🫢

πŸ’œ LICENSE πŸ’œ

This code is licensed under the terms of the GNU General Public License, version 2. Periodt. πŸ’…


That's the page, bestie! 🫢 Footer tea: perl v5.42.2, dated 2025-10-05, manual name Mailmun...erplate(3). Slay. πŸ’–

πŸ“¦ where this page comes from