WebHare 4.16 adds PrepareMailWitty as a replacement for the MakeEmailComposer API. We may deprecate the old API in the far future. New projects should always use the new API .
with the following Wittytemplate:
PrepareMailWitty can wrap the email in a template by specifying a witty resource as the 'mailtemplate' option. A mailtemplate looks like this:
The slot[name=mailbody] element is replaced with the original email. Stylesheets, mailsubjects and wh-mailcomposer- metatags are also merged into the original email.
- PrepareMailWitty supports the wh-mailcomposer metatags to specify from, to, cc and bcc values, and to apply templates
- Embed RTD documents (EmbedRTD)
- Relative image paths are resolved relative from the emailresource, and embedded in the final mail
- Resource image paths (eg <img src="mod::mymodule/...">) are supported and will be embedded
- Emails are restructured for compatibility (RestructureEmailForCompatibility) by writing out <style> information to style= attributes, setting target="_blank" to links, reapplying styles to <a> tags, etc.
- AddAttachment(Relative), AddAlternative
- Use a component from a witty instead of the entire witty by adding :component to the witty path
- Use RunEmailTestDialog to build email test previews in your application