You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kamal Bhatt <kb...@tt.com.au> on 2006/08/17 10:04:29 UTC

sendmail action- not sending

Hi
I have set up a pipeline to send some mail. I check the status of the 
action, and it says success. However, I do not get the email. Here is 
the pipeline.

     <map:match pattern="success-pipeline">
        <map:act type="sendmail">
          <map:parameter name="from" value="<invalid email>"/>
          <map:parameter name="to" value="<valid email>"/>
          <map:parameter name="attachments" value=""/>
          <map:parameter name="cc" value=""/>
          <map:parameter name="bcc" value=""/>
          <map:parameter name="subject" value="Hello"/>
          <map:parameter name="body" value="Hello"/>
          <map:generate type="file" src="xml/enquire_success.xml"/>
          <map:transform type="xslt" src="xslt/kamal.xsl">
            <map:parameter name="value" value="{status}"/>
          </map:transform>

          <map:serialize type="html"/>
        </map:act>
     </map:match>

I have removed the emails, but you get the idea. Now, what is curious is 
that I am using cocoon2.1.7 as well, also with a sendmail action on the 
same server, but using a different appserver (plain old tomcat). It 
works fine, sending from the same email address and sending to the same 
email address. This version of cocoon is 2.1.9 and is running on jboss.

Does anyone know how I can either debug this problem or fix it?

Thanks.

-- 
Kamal Bhatt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: sendmail action- not sending

Posted by Jason Johnston <co...@lojjic.net>.
Kamal Bhatt wrote:
> Jason Johnston wrote:
>> Kamal Bhatt wrote:
>>>> Cocoon 2.2 uses Maven to automatically download the Sun JARs from 
>>>> Sun's site at build time, bypassing the distribution licensing 
>>>> restrictions that prevent the JARs from being shipped with Cocoon 
>>>> directly.  So this  will no longer be a problem.
>>>>
>>> But as I understand it, this is not a problem with the Sun libraries, 
>>> but with a build process that includes files it should include, ie 
>>> the geronimo jar files. So I am confused as to how maven is used.
>>
>> The geronimo files are shipped with the Cocoon 2.1.x distribution 
>> *because* the Sun JARs cannot be but the JavaMail APIs must still be 
>> available to compile against.  The geronimo JARs provide those APIs 
>> (so it compiles), but not the implementation (so it doesn't function 
>> at runtime).  Hence if you want to actually use the mail functionality 
>> in your Cocoon app you have to replace the geronimo JARs with the Sun 
>> JARs.
>>
>> Since Maven can legally retrieve the actual Sun JARs directly to 
>> compile against, the geronimo ones are no longer needed.  Problem solved.
>>
> OK, but it would be nice to have this "feature" documented better than 
> it is. It is a serious time waster as you get no feedback from any logs. 
> This is not information that belongs in the wiki but in the main page IMHO.
> 
> Anyway, that is my two cents.

Sure, better documentation is always a good thing.  I was only 
responding to your question about whether it would be fixed in the future.

Feel free to open a JIRA issue about the documentation with the text 
you'd like to have added and what page it should go on.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: sendmail action- not sending

Posted by Kamal Bhatt <kb...@tt.com.au>.
Jason Johnston wrote:
> Kamal Bhatt wrote:
>>> Cocoon 2.2 uses Maven to automatically download the Sun JARs from 
>>> Sun's site at build time, bypassing the distribution licensing 
>>> restrictions that prevent the JARs from being shipped with Cocoon 
>>> directly.  So this  will no longer be a problem.
>>>
>> But as I understand it, this is not a problem with the Sun libraries, 
>> but with a build process that includes files it should include, ie 
>> the geronimo jar files. So I am confused as to how maven is used.
>
> The geronimo files are shipped with the Cocoon 2.1.x distribution 
> *because* the Sun JARs cannot be but the JavaMail APIs must still be 
> available to compile against.  The geronimo JARs provide those APIs 
> (so it compiles), but not the implementation (so it doesn't function 
> at runtime).  Hence if you want to actually use the mail functionality 
> in your Cocoon app you have to replace the geronimo JARs with the Sun 
> JARs.
>
> Since Maven can legally retrieve the actual Sun JARs directly to 
> compile against, the geronimo ones are no longer needed.  Problem solved.
>
OK, but it would be nice to have this "feature" documented better than 
it is. It is a serious time waster as you get no feedback from any logs. 
This is not information that belongs in the wiki but in the main page IMHO.

Anyway, that is my two cents.

-- 
Kamal Bhatt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: sendmail action- not sending

Posted by Jason Johnston <co...@lojjic.net>.
Kamal Bhatt wrote:
>> Cocoon 2.2 uses Maven to automatically download the Sun JARs from 
>> Sun's site at build time, bypassing the distribution licensing 
>> restrictions that prevent the JARs from being shipped with Cocoon 
>> directly.  So this  will no longer be a problem.
>>
> But as I understand it, this is not a problem with the Sun libraries, 
> but with a build process that includes files it should include, ie the 
> geronimo jar files. So I am confused as to how maven is used.

The geronimo files are shipped with the Cocoon 2.1.x distribution 
*because* the Sun JARs cannot be but the JavaMail APIs must still be 
available to compile against.  The geronimo JARs provide those APIs (so 
it compiles), but not the implementation (so it doesn't function at 
runtime).  Hence if you want to actually use the mail functionality in 
your Cocoon app you have to replace the geronimo JARs with the Sun JARs.

Since Maven can legally retrieve the actual Sun JARs directly to compile 
against, the geronimo ones are no longer needed.  Problem solved.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: sendmail action- not sending

Posted by Kamal Bhatt <kb...@tt.com.au>.
Jason Johnston wrote:
> Kamal Bhatt wrote:
>> Fixed this, the solution is hidden away here:
>>
>> http://wiki.apache.org/cocoon/SendMailTransformer
>>
>> Quote:
>> The SendMailTransformer needs the JavaMail and JavaBeans Activation 
>> Framework (JAF) API's from Sun to work. Add them to WEB-INF/lib. 
>> Remove geronimo-spec-javamail-1.3.1-rc5.jar and 
>> geronimo-spec-activation-1.0.2-rc4.jar from WEB-INF/lib.
>>
>> Took me a day to find this. Will this be fixed in future versions? If 
>> not, is it possible to put it on the main cocoon page as a warning or 
>> something.
>
> Cocoon 2.2 uses Maven to automatically download the Sun JARs from 
> Sun's site at build time, bypassing the distribution licensing 
> restrictions that prevent the JARs from being shipped with Cocoon 
> directly.  So this  will no longer be a problem.
>
But as I understand it, this is not a problem with the Sun libraries, 
but with a build process that includes files it should include, ie the 
geronimo jar files. So I am confused as to how maven is used.

-- 
Kamal Bhatt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: sendmail action- not sending

Posted by Jason Johnston <co...@lojjic.net>.
Kamal Bhatt wrote:
> Fixed this, the solution is hidden away here:
> 
> http://wiki.apache.org/cocoon/SendMailTransformer
> 
> Quote:
> The SendMailTransformer needs the JavaMail and JavaBeans Activation 
> Framework (JAF) API's from Sun to work. Add them to WEB-INF/lib. Remove 
> geronimo-spec-javamail-1.3.1-rc5.jar and 
> geronimo-spec-activation-1.0.2-rc4.jar from WEB-INF/lib.
> 
> Took me a day to find this. Will this be fixed in future versions? If 
> not, is it possible to put it on the main cocoon page as a warning or 
> something.

Cocoon 2.2 uses Maven to automatically download the Sun JARs from Sun's 
site at build time, bypassing the distribution licensing restrictions 
that prevent the JARs from being shipped with Cocoon directly.  So this 
  will no longer be a problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: sendmail action- not sending

Posted by Kamal Bhatt <kb...@tt.com.au>.
Fixed this, the solution is hidden away here:

http://wiki.apache.org/cocoon/SendMailTransformer

Quote:
The SendMailTransformer needs the JavaMail and JavaBeans Activation 
Framework (JAF) API's from Sun to work. Add them to WEB-INF/lib. Remove 
geronimo-spec-javamail-1.3.1-rc5.jar and 
geronimo-spec-activation-1.0.2-rc4.jar from WEB-INF/lib.

Took me a day to find this. Will this be fixed in future versions? If 
not, is it possible to put it on the main cocoon page as a warning or 
something.

Kamal Bhatt wrote:
> Hi
> I have set up a pipeline to send some mail. I check the status of the 
> action, and it says success. However, I do not get the email. Here is 
> the pipeline.
>
>     <map:match pattern="success-pipeline">
>        <map:act type="sendmail">
>          <map:parameter name="from" value="<invalid email>"/>
>          <map:parameter name="to" value="<valid email>"/>
>          <map:parameter name="attachments" value=""/>
>          <map:parameter name="cc" value=""/>
>          <map:parameter name="bcc" value=""/>
>          <map:parameter name="subject" value="Hello"/>
>          <map:parameter name="body" value="Hello"/>
>          <map:generate type="file" src="xml/enquire_success.xml"/>
>          <map:transform type="xslt" src="xslt/kamal.xsl">
>            <map:parameter name="value" value="{status}"/>
>          </map:transform>
>
>          <map:serialize type="html"/>
>        </map:act>
>     </map:match>
>
> I have removed the emails, but you get the idea. Now, what is curious 
> is that I am using cocoon2.1.7 as well, also with a sendmail action on 
> the same server, but using a different appserver (plain old tomcat). 
> It works fine, sending from the same email address and sending to the 
> same email address. This version of cocoon is 2.1.9 and is running on 
> jboss.
>
> Does anyone know how I can either debug this problem or fix it?
>
> Thanks.
>


-- 
Kamal Bhatt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org