Note, that the from, to and cc parameters can be either an email address or a wiki user name, in which case the email address of that wiki user is used instead.
To prevent this plugin to be used as open email relay, by default sending emails is prohibited. To send out mails, first set the mail addresses you want to allow to send to in configure. Each can be a list of comma separated regular expressions that emails are checked against before allowing the mail to be sent.
{Plugins}{SendEmailPlugin}{Permissions}{Allow}{MailTo} - enter .* to allow to send to anyone
%SENDEMAIL{
feedbackSuccess="Request sent, we'll contact you shortly."
feedbackError="Could not send your message, please contact us."
format="<div class=\"foswikiNotification\">$message</div>"
}%
Email template
To customize the email, including its header, create a new template topic and pass the topic name in a mailtemplate form field. The default template is SendEmailPluginTemplate:
From: %FROM%
To: %TO%
CC: %CC%
Subject: %SUBJECT%
%BODY%
The tags %FROM%, %TO%, %CC%, %SUBJECT% and %BODY% are replaced with the respective form values when the email is created.
For a template topic named MailTemplate you can either pass the name Mail or MailTemplate.
The search path for templates always starts in the current web.
Styles sendEmailPluginNotification in case of an error
Plugin Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
1.5.4 Michael Daum: don't send an empty CC; fix adding css to the header
25 Aug 2011
1.5.3 Fixes a bug in the example form.
13 Mar 2010
1.5.2 Improved error feedback and documentation.
28 Feb 2010
1.5.1 Added forgotten Config.spec file.
08 Jan 2010
1.5 Arthur Clemens: Improved error feedback; added format parameter; moved the mail template to a topic; changed param template to mailtemplate.
03 Jan 2010
1.4.2 Arthur Clemens: Added configure settings to download.
29 Mar 2009
1.4.1 Arthur Clemens: Removed default restrictions in Deny settings so that only the Allow setting needs to be set to send emails.
21 Mar 2009
1.4 Arthur Clemens: Moved topic and hardcoded settings to configure.
12 Mar 2009
1.3 Foswiki version.
06 Nov 2008
1.2.3 Michael Daum: Fixed CC emails; fixed css in docu
17 Oct 2008
1.2.1 Michael Daum: Added support for TWiki-5; fixed sending emails to login names
26 Jun 2008
1.2.0 Michael Daum: Added ALLOW/DENY preference settings to prevent this plugin from being used as an open spam relay; added template option allowing more control over email header etc; fixed mod_perl/perperl coding errors; sender address is the current user, it will default to the wikimaster's only as a last resort; allow user names in addition to plain email addresses in From, To and Cc; allow multiple users in To and Cc; added a redirectto, successsection and errorsection options to land on a different feedback page; reorganized code for lazy compilation
16 may 2007
1.1.3 Arthur Clemens: Fixed bug in bin script that caused form query data to get emptied.
15 may 2007
1.1.2 Arthur Clemens: Improved error notifications.
13 May 2007
1.1.1 Arthur Clemens: Changed sendmail script invocation to be called through bin script sendemail; added CSS styles for feedback notification; fixed typo 'feedbackSucces'.