Name : perl-Email-MIME-Kit
| |
Version : 3.0.8
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 150600.1.1
| Date : 2024-08-25 19:36:08
|
Group : Unspecified
| Source RPM : perl-Email-MIME-Kit-3.0.8-150600.1.1.src.rpm
|
Size : 0.09 MB
| |
Packager : https://www_suse_com/
| |
Summary : build messages from templates
|
Description :
Email::MIME::Kit is a templating system for email messages. Instead of trying to be yet another templating system for chunks of text, it makes it easy to build complete email messages.
It handles the construction of multipart messages, text and HTML alternatives, attachments, interpart linking, string encoding, and parameter validation.
Although nearly every part of Email::MIME::Kit is a replaceable component, the stock configuration is probably enough for most use. A message kit will be stored as a directory that might look like this:
sample.mkit/ manifest.json body.txt body.html logo.jpg
The manifest file tells Email::MIME::Kit how to put it all together, and might look something like this:
{ \"renderer\": \"TT\", \"header\": [ { \"From\": \"WY Corp < norepliesAATTwy.example.com>\" }, { \"Subject\": \"Welcome aboard, [% recruit.name %]!\" } ], \"alternatives\": [ { \"type\": \"text/plain\", \"path\": \"body.txt\" }, { \"type\": \"text/html\", \"path\": \"body.html\", \"container_type\": \"multipart/related\", \"attachments\": [ { \"type\": \"image/jpeg\", \"path\": \"logo.jpg\" } ] } ] }
*Inline images* may be accessed with the function \'cid_for\', for example to include the above logo.jpg:
< img style=\"margin: 0 auto\" src=\"cid:[% cid_for(\"logo.jpg\") %]\">
*Please note:* the assembly of HTML documents as multipart/related bodies may be simplified with an alternate assembler in the future.
The above manifest would build a multipart alternative message. GUI mail clients would see a rendered HTML document with the logo graphic visible from the attachment. Text mail clients would see the plaintext.
Both the HTML and text parts would be rendered using the named renderer, which here is Template-Toolkit.
The message would be assembled and returned as an Email::MIME object, just as easily as suggested in the SYNOPSIS above.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/SLE_15_SP6/noarch |