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

version 1.001

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.

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 <rjbs@cpan.org>

This software is copyright (c) 2009 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as perl itself.