Differences between revisions 5 and 6
Revision 5 as of 2007-03-26 04:20:33
Size: 1891
Comment:
Revision 6 as of 2009-09-20 23:27:18
Size: 1891
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

!WARNING! This is still in the concept stage. Don't use as yet.

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:

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

HowToSendMail (last edited 2009-09-20 23:27:18 by localhost)