You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by le...@cocoon.apache.org on 2004/08/29 17:02:22 UTC
[Cocoon Lenya Wiki] New: SendMailHowto
Date: 2004-08-29T08:02:22
Editor: JohannesJander <su...@jandermail.de>
Wiki: Cocoon Lenya Wiki
Page: SendMailHowto
URL: http://wiki.apache.org/cocoon-lenya/SendMailHowto
no comment
New Page:
== Overview ==
This howto describes ways to add a form to a page from which visitors to your site can send an email to you (or the webmaster).
Using this methods, you can:
* offer a feedback page to your visitors
* protect your email address from spammers
* use a solution based on cocoon - the same technology as is Lenya (contrary to cgi-based FormMail-scripts.
To get an idea what this howto is all about, you might want to read the following files:
* http://cocoon.apache.org/2.1/userdocs/actions/sendmail-action.html
* http://cocoon.apache.org/2.1/userdocs/xsp/sendmail.html
* http://wiki.apache.org/cocoon/RecipeXSPSendMailExample
* http://wiki.apache.org/cocoon/MailBodyViaPipeline
== Prerequisites ==
You need to install two additional .jar-Files in order to send mails via cocoon. You can obtain those files from sun.com.
Go to http://java.sun.com/products/javamail/ and download the JavaMail package.
Go to http://java.sun.com/beans/glasgow/jaf.html and download the JavaBeans Activation Framework (JAF) package.
Extract the package contents and copy the .jar files to WEB-INF/lib/. If you are using a binary distribution of Lenya in conjunction with Tomcat, your directory layout might look like this:
jakarta-tomcat
- webapps
- cocoon
- WEB-INF
- lenya
The exact location of the WEB-INF directory might be different if you compiled Lenya from source or if you are using Jetty instead of Tomcat.
== Declaring the sendmail Action ==
{{{
<map:components>
<map:actions>
<map:action name="sendmail" logger="sitemap.action.sendmail"
src="org.apache.cocoon.acting.Sendmail"/>
</map:actions>
</map:components>
}}}
== Creating a Sendmail-Form ==
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org