Ricardo SIGNES 😄

NAME

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

VERSION

version 1.003

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.

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

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.