%SENDMAIL{}%
variable is handled by the SendMailPlugin.
%SENDMAIL{ action="send" ... }%
Parameter | Description | Default |
---|---|---|
action="" | Only action="send" is supported, it will send an e-mail | "" (no action) |
excludetopic="MyTemplate" | Exclude action for named topic. Typically used in a template topic containing the SENDMAL variable to disable the action when viewing the topic. | "" (no exclude) |
from="admin@example.com" | E-mail address or WikiName of sender. If a WikiName is specified, the registered e-mail of that person is used. Supported tokens: • $webmastername - name of TWiki administrator. • $webmasteremail - e-mail of TWiki administrator. • $username - WikiName of logged in user. • $useremail - e-mail address of the logged in user. Defaults to TWiki administrator. See note on open mail relay. | "$webmastername <$webmasteremail>" |
to="jom@example.com" | To list: Comma-space delimited list of e-mail addresses or WikiNames of adressees. Same tokens supported as in from="" . Defaults to TWiki administrator. | "$webmastername <$webmasteremail>" |
cc="jimmy@example.com" | CC list: Comma-space delimited list of e-mails or WikiNames. Same tokens supported as in from="" . | "" |
bcc="boss@example.com" | BCC list: Comma-space delimited list of e-mails or WikiNames. Same tokens supported as in from="" . | "" |
subject="Any text" | E-mail subject. Text may include TWikiVariables such as %URLPARAM{subject}% , and format tokens such as $n and $percnt . | (help message) |
text="Any text" orplaintext="Any text" | E-mail body in plain text format. Text may include TWikiVariables and format tokens. | (help message) |
htmltext="Any HTML" | E-mail body in HTML format, optional. Text may include TWikiVariables and format tokens. Double quotes need to be escaped, such as <a href=\"http://twiki.org/\">TWiki.org<a> . A MIME Multi-Part message is sent if both, plaintext and htmltext are specified. | "" |
onsuccess="..." | Text shown in place of the SENDMAIL variable on success, default is empty. Text may include TWikiVariables and format tokens. | "" |
onerror="| $error ||" | Error message shown in place of the SENDMAIL variable on error, if any. Text may include TWikiVariables and format tokens. Token $error expands to the error message. | "$error" |
%SENDMAIL{ action="send" to="$username <$useremail>" subject="Status change" text="Status changed to %FORMFIELD{Status}%" }%