plugins/send_email/doc/send_email.textile
h1. SendEmailPlugin
Allows to send e-mails through an e-mail form.
h2. Usage
* Create a HTML form using RawHTMLBlock that invokes the {sendemail} action
* Add a "to" and "message" field and a submit button
* Make sure to fill in allowed 'to' addresses in plugin settings
h2. HTML form
h3. Form action
You should use {sendemail} macro as form action, it will be expanded as:
* */profile/<identifier>/plugin/send_email/deliver* in profile context
* */plugin/send_email/deliver* in environment context
h3. 'Subject' field
Subject of message.
(default: 'New mail')
h3. 'Message' field
Body of message.
(required)
h3. 'To' field
Target address. Accepts multiple addresses separated by comma.
(required)
h3. extra fields
Each other params in HTML form will compose message body in a format "key: value"
h3. Example
<pre>
<form action='{sendemail}' method='post'>
To: <input type='text' name='to'/>
Subject: <input type='text' name='subject'/>
Message: <input type='text' name='message'/>
<input type='submit'/>
</form>
</pre>
h2. Options
h3. Using ajax
Ajax is supported using #ajax-form as id of HTML form.
Example:
<pre>
<form action='{sendemail}' id='ajax-form'>
To: <input type='text' name='to'/>
Subject: <input type='text' name='subject'/>
Message: <input type='text' name='message'/>
<input type='submit'/>
</form>
</pre>
h2. Info
This plugin was inspired by "Foswiki SendEmailPlugin":http://foswiki.org/Extensions/SendEmailPlugin