Email::MIME::Kit::Assembler::TextifyHTML - textify some HTML arguments to assembly
version 1.005
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.
body
This will be done by HTML::FormatText::WithLinks, using the arguments provided in the formatter_args assembler attribute.
formatter_args
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.
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.
Ricardo Signes <cpan@semiotic.systems>
Ricardo Signes <rjbs@semiotic.systems>
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.
To install Email::MIME::Kit::Assembler::TextifyHTML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::MIME::Kit::Assembler::TextifyHTML
CPAN shell
perl -MCPAN -e shell install Email::MIME::Kit::Assembler::TextifyHTML
For more information on module installation, please visit the detailed CPAN module installation guide.