Email::MIME::Kit::Assembler::Markdown - build multipart/alternative messages from Markdown alone


Email-MIME-Kit-Assembler-Markdown documentation  | view source Contained in the Email-MIME-Kit-Assembler-Markdown distribution.

Index


NAME

Top

Email::MIME::Kit::Assembler::Markdown - build multipart/alternative messages from Markdown alone

VERSION

Top

version 0.093070

SYNOPSIS

Top

In your mkit's (JSON, here) manifest:

  {
    "renderer" : "TT",
    "assembler": [
      "Markdown",
      { "html_wrapper": "wrapper.html" }
    ],
    "path"  : "body.mkdn",
    "header": [
      { "Subject": "DynaWoop is now hiring!" },
      { "From"   : "[% from_addr  %]" }
      { "To"     : "[% user.email %]" }
    ]
  }

This kit will build a multipart/alternative message with a plaintext part (containing the rendered contents of body.mkdn ) and an HTML part (containing body.mkdn rendered into HTML using Markdown).

At present, attachments are not supported. Actually, quite a few things found in the standard assembler are not yet supported. The standard assembler desperately needs to be refactored to make its features easier to incorporate into other assemblers.

The html_wrapper parameter for the Markdown assembler is the path to a kit entry. If given, that kit entry will be used for the HTML part, and the Markdown-produced HTML will be injected into it, replacing a comment containing the marker given in the Markdown assembler's configuration. The default marker is CONTENT, so the wrapper.html used above might read as follows:

  <h1>DynaWoop Dynamic Woopages</h1>
  <!-- CONTENT -->
  <p>Click to unsubscribe: <a href="[% unsub_url %]">here</a></p>

The text_wrapper setting works exactly the same way, down to looking for an HTML-like comment containing the marker. It wraps the Markdown content after it has been rendered by the kit's Renderer, if any.

AUTHOR

Top

  Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top


Email-MIME-Kit-Assembler-Markdown documentation  | view source Contained in the Email-MIME-Kit-Assembler-Markdown distribution.