blob: 62f40d207b6bbcc98990de1a630b550838d4007d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">
<page>
<resources>
<resource type="doc" href="userdocs/actions/sendmail-action.html">Actions</resource>
<resource type="doc" href="userdocs/xsp/sendmail.html">Logicsheet</resource>
</resources>
<title>Send EMail</title>
<p>
You can choose which frontend is used to actually compose the email.
The old action is only kept for compatibility and does not support
attachments. Migrating to the new action is very painless however: only
reading request parameters is not supported by the new action anymore
since this can easily be done with input modules from sitemap.
</p>
<p>
The default installation of Apache Cocoon does not allow
uploads. This feature needs to be enabled in web.xml
</p>
<p>
Sending email from this sample is restricted to clients accessing the
server as "localhost". So even if the client runs on the same host, it
does not work if the URL is not "http://<b>localhost</b>..." The sample
silently fails otherwise.
</p>
<p style="color:red;">
<xsp-request:get-attribute name="org.apache.cocoon.acting.Sendmail" default=""/>
</p>
<table cellpadding="2" cellspacing="2" border="0">
<tbody>
<form method="POST" enctype="multipart/form-data">
<tr>
<td valign="Top" align="Right">SMTP Host</td>
<td valign="Top">
<input type="text" name="smtphost" value="localhost"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">From</td>
<td valign="Top">
<input type="text" name="from" value="cocoon@localhost"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">To</td>
<td valign="Top">
<input type="text" name="to" value="@localhost"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">CC</td>
<td valign="Top">
<input type="text" name="cc"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">BCC</td>
<td valign="Top">
<input type="text" name="bcc"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">Subject</td>
<td valign="Top">
<input type="text" name="subject"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">Body</td>
<td valign="Top">
<textarea name="body" rows="10" cols="72"/>
</td>
<td />
</tr>
<tr>
<td valign="Top" align="Right">File to attach</td>
<td valign="Top">
<input type="file" name="attachment"/>
</td>
<td/>
</tr>
<tr>
<td>Choose the frontend:</td>
<td>Send mail using
<input type="submit" name="use-action" value="action"/>
<input type="submit" name="use-oldaction" value="old action"/>
<input type="submit" name="use-logicsheet" value="logicsheet"/>
</td>
<td/>
</tr>
</form>
</tbody>
</table>
</page>
</xsp:page>