You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Rui Alberto <ru...@ptinovacao.pt> on 2007/05/15 21:45:35 UTC
Sendmail action: body message using src parameter
Hi,
I'm trying to send an email using Sendmail action. Everything works fine
if body message is set using parameter "body". If body message is set as
an URL specifying the source of the text body of the email (using src
parameter), the message is not sent.
I'm using cocoon-2.1.10. I also replaced geronimo-* by mail.jar and
activation.jar.
sitemap:
<map:act type="sendmail">
<map:parameter name="from" value="aa@xxxx.pt"/>
<map:parameter name="to" value="bb@xxxx.pt"/>
<map:parameter name="subject" value="message subject"/>
<map:parameter name="src" value="cocoon:/target_name"/>
<map:parameter name="srcMimeType" value="text/plain"/>
...
Any idea what may be wrong?
Rui
strack trace:
===========
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: IOException while sending
message;
nested exception is:
java.io.IOException: No content
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Sendmail action: body message using src parameter
Posted by Rui Alberto <ru...@ptinovacao.pt>.
Obrigado Diogo,
I'm going to use SendMailTransformer instead! :)
Thanks..
Rui
On Wed, 2007-05-16 at 10:01 +0100, Diogo Matos wrote:
> Hi Rui,
>
> There is a bug in the the org.apache.cocoon.mail.MailMessageSender
> class. I didn't have time (and have no idea how) to change the cocoon
> source code.
>
> Just change the from
> public void setBodyURL(String url, String type) {
> if (body != null) {
> this.body = new Body(url, type, true);
> }
> }
>
> To
> public void setBodyURL(String url, String type) {
> if (body == null) {
> this.body = new Body(url, type, true);
> }
> }
>
> Hope this helps (Boa Sorte)
> Diogo Matos
>
>
> On 5/15/07, Rui Alberto <ru...@ptinovacao.pt> wrote:
> Hi,
> I'm trying to send an email using Sendmail action. Everything
> works fine
> if body message is set using parameter "body". If body message
> is set as
> an URL specifying the source of the text body of the email
> (using src
> parameter), the message is not sent.
>
> I'm using cocoon-2.1.10. I also replaced geronimo-* by
> mail.jar and
> activation.jar.
>
> sitemap:
> <map:act type="sendmail">
> <map:parameter name="from" value=" aa@xxxx.pt"/>
> <map:parameter name="to" value="bb@xxxx.pt"/>
> <map:parameter name="subject" value="message subject"/>
> <map:parameter name="src" value="cocoon:/target_name"/>
> <map:parameter name="srcMimeType" value="text/plain"/>
> ...
>
> Any idea what may be wrong?
>
> Rui
>
> strack trace:
> ===========
> javax.mail.SendFailedException: Sending failed;
> nested exception is:
> javax.mail.MessagingException: IOException while
> sending
> message;
> nested exception is:
> java.io.IOException: No content
> at javax.mail.Transport.send0(Transport.java:219)
> at javax.mail.Transport.send(Transport.java:81)
> ...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Sendmail action: body message using src parameter
Posted by Diogo Matos <di...@gmail.com>.
Hi Rui,
There is a bug in the the org.apache.cocoon.mail.MailMessageSender class. I
didn't have time (and have no idea how) to change the cocoon source code.
Just change the from
public void setBodyURL(String url, String type) {
if (body != null) {
this.body = new Body(url, type, true);
}
}
To
public void setBodyURL(String url, String type) {
if (body == null) {
this.body = new Body(url, type, true);
}
}
Hope this helps (Boa Sorte)
Diogo Matos
On 5/15/07, Rui Alberto <ru...@ptinovacao.pt> wrote:
>
> Hi,
> I'm trying to send an email using Sendmail action. Everything works fine
> if body message is set using parameter "body". If body message is set as
> an URL specifying the source of the text body of the email (using src
> parameter), the message is not sent.
>
> I'm using cocoon-2.1.10. I also replaced geronimo-* by mail.jar and
> activation.jar.
>
> sitemap:
> <map:act type="sendmail">
> <map:parameter name="from" value="aa@xxxx.pt"/>
> <map:parameter name="to" value="bb@xxxx.pt"/>
> <map:parameter name="subject" value="message subject"/>
> <map:parameter name="src" value="cocoon:/target_name"/>
> <map:parameter name="srcMimeType" value="text/plain"/>
> ...
>
> Any idea what may be wrong?
>
> Rui
>
> strack trace:
> ===========
> javax.mail.SendFailedException: Sending failed;
> nested exception is:
> javax.mail.MessagingException: IOException while sending
> message;
> nested exception is:
> java.io.IOException: No content
> at javax.mail.Transport.send0(Transport.java:219)
> at javax.mail.Transport.send(Transport.java:81)
> ...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
RE: Sendmail action: body message using src parameter
Posted by Jasha Joachimsthal <j....@hippo.nl>.
It looks like the SendmailAction doesn't support it [1]. The SendmailTransformer does.
Regards,
Jasha
[1] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/acting/SendmailAction.html
[2] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/mail/transformation/SendMailTransformer.html
-----Original Message-----
From: Rui Alberto [mailto:rui-l-goncalves@ptinovacao.pt]
Sent: Tue 5/15/2007 9:45 PM
To: users@cocoon.apache.org
Cc:
Subject: Sendmail action: body message using src parameter
Hi,
I'm trying to send an email using Sendmail action. Everything works fine
if body message is set using parameter "body". If body message is set as
an URL specifying the source of the text body of the email (using src
parameter), the message is not sent.
I'm using cocoon-2.1.10. I also replaced geronimo-* by mail.jar and
activation.jar.
sitemap:
<map:act type="sendmail">
<map:parameter name="from" value="aa@xxxx.pt"/>
<map:parameter name="to" value="bb@xxxx.pt"/>
<map:parameter name="subject" value="message subject"/>
<map:parameter name="src" value="cocoon:/target_name"/>
<map:parameter name="srcMimeType" value="text/plain"/>
...
Any idea what may be wrong?
Rui
strack trace:
===========
javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: IOException while sending
message;
nested exception is:
java.io.IOException: No content
at javax.mail.Transport.send0(Transport.java:219)
at javax.mail.Transport.send(Transport.java:81)
...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org