You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gerben ten Wolde <ge...@xs4all.nl> on 2004/07/08 15:48:58 UTC
Sendmail action won't use the smtphost I assign
Hi there,
I'm trying to send an automated mail reply as part of a webapp I'm currently developing. I'm using cocoon 2.1.5 and tomcat 4.1.3. I've placed the mail.jar and activation.jar in the WEB-INF/lib dir of my webapp.
I'm using the following matcher to test sending mail:
<map:match pattern="testSendmail">
<map:act type="sendmail">
<map:parameter name="smtphost" value="194.109.6.51"/>
<map:parameter name="from" value="[valid email address]"/>
<map:parameter name="to" value="[valid email address]"/>
<map:parameter name="subject" value="Cocoon sendmail testmessage"/>
<map:parameter name="body" value="Test text"/>
<!-- -->
<map:read src="content/succes.html" mime-type="text/html"/>
</map:act>
<map:read src="content/failure.html" mime-type="text/html"/>
</map:match>
Sadly I alway see the failure page. Looking in sitemap.log I found the following (I marked the lines of interest with [***]):
DEBUG (2004-07-08) 15:41.28:343 [sitemap] (/vervonden/testSendmail) http11569-Processor3/PreparableMatchNode: Matcher 'wildcard' matched prepared pattern 'testSendmail' at file:/E:/Tomcat-4.1.3/webapps/vervonden/sitemap.xmap:537:38
DEBUG (2004-07-08) 15:41.28:343 [sitemap] (/vervonden/testSendmail) http11569-Processor3/InvokeContext:
Current Sitemap Parameters:
LEVEL 1
PARAM: '0' VALUE: 'testSendmail'
DEBUG (2004-07-08) 15:41.28:343 [sitemap.action.sendmail] (/vervonden/testSendmail) http11569-Processor3/Sendmail: SendmailAction: act start
[***] DEBUG (2004-07-08) 15:41.28:343 [sitemap.action.sendmail] (/vervonden/testSendmail) http11569-Processor3/Sendmail: SendmailAction: overriding default smtp server, using 194.109.6.51
ERROR (2004-07-08) 15:41.29:406 [sitemap.action.sendmail] (/vervonden/testSendmail) http11569-Processor3/Sendmail: SendmailAction: MessagingException: An error occured while sending email.
javax.mail.MessagingException: Sending failed;
nested exception is:
[***] class javax.mail.MessagingException: Could not connect to SMTP host: 127.0.0.1, port: 25;
nested exception is:
java.net.ConnectException: Connection refused: connect
at org.apache.cocoon.mail.MailMessageSender.send(MailMessageSender.java:355)
at org.apache.cocoon.acting.Sendmail.act(Sendmail.java:223)
<-- continues-->
It seems that eventhough the action is aware of the smtp server I assign, the underlying mail component isn't.
Anyone got any idea what (if anything) I am missing here?
yours,
Gerben ten Wolde