Send Email Plugin
Allows to send e-mail through an e-mail form.
Usage
Example
<form enctype="application/x-www-form-urlencoded" name="mailform" action="%SCRIPTURL{sendemail}%/%WEB%/%TOPIC%" method="POST">
<input type="hidden" name="successsection" value="thanks" />
<fieldset>
<legend><b>Send Email</b></legend>
<div class="twikiFormSteps">
<div class="twikiFormStep">
<h3>To:</h3>
<input class="twikiInputField" id="to" name="to" size="30" type="text" value="%URLPARAM{"to"}%" />
</div>
<div class="twikiFormStep">
<h3>CC:</h3>
<input type="text" class="twikiInputField" id="cc" name="cc" size="30" value="%URLPARAM{"cc"}%" />
</div>
<div class="twikiFormStep">
<h3>Subject:</h3>
<input type="text" class="twikiInputField" id="subject" name="subject" size="70" value="%URLPARAM{"subject"}%" />
</div>
<div class="twikiFormStep">
<h3>Message:</h3>
<textarea class="twikiInputField" cols="70" name="body" rows="6" style="width:100%">%URLPARAM{"body"}%</textarea>
</div>
<div class="twikiFormStep">
<input type="submit" class="twikiSubmit" value="Send" />
<input type="button" class="twikiButtonCancel" value="Cancel" onclick="window.location.href='%SCRIPTURL{view}%/%WEB%/%TOPIC%';" />
</div>
</div>
</fieldset>
</form>
%SENDEMAIL%
<!--
%STARTSECTION{"thanks"}%
---+ Notification
%SENDEMAIL%
<input type="button" value="Ok" class="twikiButton" onclick="window.location.href='%URLPARAM{"origurl" default="%SCRIPTURLPATH{view}%/%BASEWEB%/%BASETOPIC%"}%'" />
%ENDSECTION{"thanks"}%
-->
Plugin Tests
- SendEmailPlugin is enabled.
Plugin Settings
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Allows to send e-mail through an e-mail form
- Default feedback messages:
- Set EMAIL_SENT_SUCCESS_MESSAGE = Email sent!
- Set EMAIL_SENT_ERROR_MESSAGE = Could not send email.
- Default mail permissions, (note: by default any emailing is prohibited)
- Set ALLOWMAILTO =
- Set DENYMAILTO = .*
- Set ALLOWMAILFROM =
- Set DENYMAILFROM = .*
- Set ALLOWMAILCC =
- Set DENYMAILCC = .*
- Debug plugin: (See output in
data/debug.txt)
CSS classes
| Class name |
Note |
sendEmailPluginNotification |
Used for feedback after sending a mail |
sendEmailPluginError |
Styles sendEmailPluginNotification in case of an error |
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this
plugin. The following instructions are for the administrator who installs the
plugin on the server where TWiki is running.
- Download the ZIP file from the Plugin web (see below)
- Unzip
SendEmailPlugin.zip in your twiki installation directory. Content: | File: | Description: |
bin/sendemail | CGI script |
templates/sendemail.tmpl | Email template |
data/TWiki/SendEmailPlugin.txt | Documentation |
lib/TWiki/Plugins/SendEmailPlugin.pm | Plugin stub |
lib/TWiki/Plugins/SendEmailPlugin/Core.pm | Plugin core |
pub/TWiki/SendEmailPlugin/sendemailplugin.css | CSS styles |
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins