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.001

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) 2009 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.