cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Gassmann <>
Subject Re: Problem with sendmail action
Date Wed, 30 Nov 2005 15:26:15 GMT
Goetzmann Bertrand wrote:

> Hello,
> I use the sendmail action in my sitemap.xmap to, of course, send 
> emails from a form. It works well if all the parameters needed are 
> correct, but otherwise I can't read the "status" parameter that the 
> action set.
> I think it is perhaps a bug because in the concerned source code, 
> from org.apache.cocoon.acting package, if the operation 
> fails (an exception is raized), the act method returns null, and then 
> you can't read the "status" (with the value server-error or 
> user-error) parameter nor the "message" parameter, in the sitemap.
> Is someone cab confirm this ? Thank.
> Bertrand Goetzmann.
After having a look to the source code, yes you're right !
When an exception occurs, the sendmail action returns null to the 
sitemap. But, I can see this in the source code :   
I guess it is possible to get the status not using what's returned by 
the action but using what the action sets in the request with the input 
module request:
{request:attributes/org.apache.cocoon.acting.Sendmail/status} for the status

and {request:attributes/org.apache.cocoon.acting.Sendmail/status} for 
the message.

This is really a strange behaviour !


View raw message