The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Email::MIME::Kit::Assembler::TextifyHTML - textify some HTML arguments to assembly

VERSION

version 1.005

SYNOPSIS

In your manifest.yaml:

  alteratives:
  - type: text/plain
    path: body.txt
    assembler:
    - TextifyHTML
    - html_args: [ body ]
  - type: text/html
    path: body.html

Then:

  my $email = $kit->assemble({
    body => '<div><p> ... </p></div>',
  });

The body argument will be rendered intact in the the HTML part, but will converted to plaintext before the plaintext part is rendered.

This will be done by HTML::FormatText::WithLinks, using the arguments provided in the formatter_args assembler attribute.

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

BY THE WAY

There will probably exist a TextifyHTML renderer, someday, which will first render the part with the parent part's renderer, and then convert the produced HTML to text. This would allow you to use one template for both HTML and text.

AUTHOR

Ricardo Signes <cpan@semiotic.systems>

CONTRIBUTOR

Ricardo Signes <rjbs@semiotic.systems>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by Ricardo Signes.

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