TWiki
>
TWiki Web
>
TWikiVariables
>
VarSENDMAIL
(22 Jan 2019,
TWikiAdminUser
)
(raw view)
#VarSENDMAIL ---+++ SENDMAIL{...} -- send e-mail from actions in TWiki topics, useful for workflow automation * The =%<nop>SENDMAIL{}%= variable is handled by the SendMailPlugin. * Syntax: =%<nop>SENDMAIL{ action="send" ... }%= * Parameters:%STARTSECTION{parameters}% | *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: %BB% =$webmastername= - name of TWiki administrator. %BB% =$webmasteremail= - e-mail of TWiki administrator. %BB% =$username= - %SYSTEMWEB%.WikiName of logged in user. %BB% =$useremail= - e-mail address of the logged in user. %BR% Defaults to TWiki administrator. See note on [[%IF{"'%INCLUDINGTOPIC%'='SendMailPlugin'" else="SendMailPlugin"}%#OpenMailRelay][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 %SYSTEMWEB%.TWikiVariables such as =%<nop>URLPARAM{subject}%=, and [[%SYSTEMWEB%.FormatTokens][format tokens]] such as =$n= and =$percnt=. | (help message) | | =text="Any text"= or%BR% =plaintext="Any text"= | E-mail body in plain text format. Text may include %SYSTEMWEB%.TWikiVariables and [[%SYSTEMWEB%.FormatTokens][format tokens]]. | (help message) | | =htmltext="Any HTML"= | E-mail body in HTML format, optional. Text may include %SYSTEMWEB%.TWikiVariables and [[%SYSTEMWEB%.FormatTokens][format tokens]]. Double quotes need to be escaped, such as =<a href=\"http://twiki.org/\">TWiki.org<a>=. A [[http://en.wikipedia.org/wiki/MIME][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 %SYSTEMWEB%.TWikiVariables and [[%SYSTEMWEB%.FormatTokens][format tokens]]. | =""= | | =onerror="| $error ||"= | Error message shown in place of the SENDMAIL variable on error, if any. Text may include %SYSTEMWEB%.TWikiVariables and [[%SYSTEMWEB%.FormatTokens][format tokens]]. Token =$error= expands to the error message. | ="$error"= |%ENDSECTION{parameters}% * Security: See note on [[SendMailPlugin#OpenMailRelay][how to avoid an open mail relay]] * Example:%BR% =%<nop>SENDMAIL{ action="send" to="$username <$useremail>" subject="Status change" text="Status changed to %<nop>FORMFIELD{Status}%" }%= * Category: DevelopmentVariables, EmailAndNotificationVariables, WorkflowAndAutomationVariables * Related: SendMailPlugin
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r2 - 22 Jan 2019
-
TWikiAdminUser
Home
Site map
JUNOProjectTemplateWeb web
TWiki web
TWiki Web
User registration
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
InterWikis
ManagingUsers
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Account
Log In
Register User
Български
Cesky
Dansk
Deutsch
English
Español
_Français_
Italiano
日本語
한글
Nederlands
Polski
Português
Русский
Svenska
简体中文
簡體中文
E
dit
A
ttach
Copyright © 1999-2025 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.VarSENDMAIL
.