Difference: MailInContribTemplate (1 vs. 3)

Revision 32015-09-16 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="MailInContrib"

Templates for the MailInContrib

Revision 22015-09-16 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="MailInContrib"

Templates for the MailInContrib

Revision 12015-09-16 - TWikiAdminUser

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="MailInContrib"

Templates for the MailInContrib

DO NOT MODIFY THIS TOPIC

This is a normal TWiki topic, but it is also a template file, as described in TWikiTemplates. It contains the template definitions used by the MailInContrib to insert mail messages in topics.

Each template is specified in the form of three TWiki template definitions, (surrounded by verbatim tags below for readability). The template to use when inserting incoming mail in a topic is decided by the {MailInContrib} configure setting and from the parameters in the <--MAIL--> comment in the topic. The default template is called default.

MAILIN:default template

The first template definition controls how the mail is formatted:

%TMPL:DEF{MAILIN:default}%
   * Subject: %MAILSUBJECT%
   * From: %MAILFROM%
   * To: %MAILTO%
   * CC: %MAILCC%
   * Date: %MAILDATE%

%MAILBODY%

__Attachments:__
%MAILATTACHMENTS%

-- %WIKIUSERNAME% - %SERVERTIME%
%TMPL:END%

%MAILATTACHMENTS% in the previous template will be expanded to a list of attachments that came in the mail. Each attachment in the list is formatted by one of the following templates - the MAILIN:...:ATTACHMENT is used for regular attachments, MAILIN:...:IMAGE for image files:

%TMPL:DEF{MAILIN:default:ATTACHMENT}%   * [[%ATTACHURL%/%A_FILE%][%A_FILE%]]
%TMPL:END%

%TMPL:DEF{MAILIN:default:IMAGE}%   * [[%ATTACHURL%/%A_FILE%][%A_FILE%]] %BR% <img src='%ATTACHURL%/%A_FILE%' style='max-width:800px' alt='' />
%TMPL:END%

MAILIN:normal template

Legacy "normal" template:

%TMPL:DEF{MAILIN:normal}%   * *%SUBJECT%*: %MAILBODY% -- %WIKIUSERNAME% -
%%SERVERTIME%
%MAILATTACHMENTS%%TMPL:END%

%TMPL:DEF{MAILIN:normal:ATTACHMENT}%   * [[%ATTACHURL%/%A_FILE%][%A_FILE%]]
%TMPL:END%

DO NOT MODIFY THIS TOPIC

If you want to modify or add any templates, create the TWiki topic MailInContribUserTemplate. This topic is automatically included here if it exists, but it is not shipped with the MailInContrib. You can create this topic in individual webs, as described in TWikiTemplates. In this case the template will only apply in that specific web.

<-- The following line includes a template called "MailInContribUser", which the template search rules automatically resolve to a topic called MailInContribUserTemplate. -->
%TMPL:INCLUDE{"MailInContribUser"}%
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.MailInContribTemplate.