On 01/04/2011 20:56, Hemangi Dua wrote:
Hi
This is the first time I am working on cocoon. I am working on project which is already build bu someone else.
They have used  "SendMailTransformer" for "Contact-us"

Initially website was hosted on hostjava.net server, now I am trying to run it
on my local machine.

Now all pages, xslts and css are working fine, but when I fill contact-us form
and click on submit button, it shows an error "Could not connect to SMTP host:
localhost, port: 25"

May be port 25 of hostjava(where website was hosted previously) was configure
accordingly.

As I am new to cocoon I am confuse between
     1. Where to mail.jar and activation.jar file
     2. I have more than WEB-INF/lib, so in which folder I have to add there jar
file.
     3. How to configure port 25
I am using Tomcat as a server.

First of all: which Cocoon are you running? 2.1X / 2.2?

Regarding where to fetch and how to embed mail and activation JARs, take a look at [1], specifically the "Problem & Solution" section. Basically all you have to do is download those JARs from the Internet and put both inside the WEB-INF/lib directory of your cocoon web application, then package everything in a WAR file and finally deploy the resulting WAR file to your container (Tomcat). However, since you say that the web application used to be running, you should already have everything in place.

Regarding the SMTP error, you can either:
1. configure an SMTP server on the same machine on which Tomcat is running (like Postfix or Exim); 2. configure the SendMailTransformer to use an external SMTP server (see how by looking at [1]): for example, you can declare something like

  <map:transformer name="sendmail" 
src="org.apache.cocoon.mail.transformation.SendMailTransformer">
     <smtphost>smtp.foo.com</smtphost>
     <smtpport>25</smtpport>
  </map:transformer>

in which you can easily point to an external SMTP server.

Cheers.

[1] http://cocoon.apache.org/2.2/blocks/mail/1.0/1099_1_1.html

--
Apache Cocoon Committer and PMC Member

http://people.apache.org/~ilgrosso/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to