!WARNING! This is still in the concept stage. Don't use as yet.
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:
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:
- - webapps
- - cocoon
- - WEB-INF
- - cocoon
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>