[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-05-31 Thread Jasha Joachimsthal (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12414052 
] 

Jasha Joachimsthal commented on COCOON-1818:


Could someone please commit the SendMailTransformer.diff so this bug is fixed? 
Thanks

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug

>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: SendMailTransformer.diff, sendmail-exceptions.diff, 
> sendmail-exceptions2.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-03-30 Thread Helma van der Linden (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12372459 
] 

Helma van der Linden commented on COCOON-1818:
--

Sorry to chip in so late, but when I was looking at this class I noticed a 
FIXME that states that it would be a good idea to use the same MailSender 
component that is used for the SendMailAction and SendMail XSP logicsheet.

I've started working on this and it seemed rather straightforward, but 
unfortunately something crashed and I lost the modified code before I was able 
to properly finish and test it.

So how about killing two birds with one stone and see if the class can be 
improved by using the MailSender component as well as fixing this bug? Maybe 
using the component already fixes this bug. At the very least, the behaviour 
will be consistent.

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug
>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: sendmail-exceptions.diff, sendmail-exceptions2.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-03-30 Thread Simone Gianni (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12372447 
] 

Simone Gianni commented on COCOON-1818:
---

Ok, I'll try .. 

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug
>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: sendmail-exceptions.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-03-30 Thread Jasha Joachimsthal (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12372443 
] 

Jasha Joachimsthal commented on COCOON-1818:


My solution was like #3 (not sure whether email:error should be inside 
email:result or outside like it is now) but the last time I did something in 
Java was in the 20th century so I want someone else at Hippo to have a look at 
it. :)

Other thing. If you send it to 10 addresses and it creates an exception, at 
address 6, it stops and 7-10 won't get the mail. Is this behaviour correct, 
disirable or not?

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug
>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: sendmail-exceptions.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-03-30 Thread Simone Gianni (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12372442 
] 

Simone Gianni commented on COCOON-1818:
---

IMMO, it's a good idea to report an exception indicating that a single email 
was not sent in the XML report. This is useful to report to the user which 
email was invialid, and more important since sending a bunch of emails is not 
transactional, it's not possible to rollback, and this if the entire batch 
sending is aborted with an exception when an email fails there would be no way 
to avoid sending some emails more than once.

Jasha, you are completely right : if the exception happens before the result 
element is opened, with my patch it would be closed anyway, so there are three 
possible solutions :
1) Use a boolean to indicate that the result element was opened, and check this 
boolean before closing it in the finally. Pros are that it's simple to 
implement, cons are that the result XML will have sometimes have a result 
containing an exception, other times only the exception not wrapped inside a 
result.
2) Open the result element always after everything has been done, so that a 
result will always contain the result of a good email, while exceptions will 
always be reported outside the result element.
3) Open the result element always before everything is done, so that an 
exception will always be wrapped inside a result, wether it happens at the very 
early stage of email sending or at the last step of it.

I think the number 3 is the best one. It should not be that hard to implement, 
just moving the start element up in the code as much as possible (if possible, 
at the first line of the sendMail method).

Jasha, do you want to try? :)

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug
>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: sendmail-exceptions.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-03-30 Thread Jasha Joachimsthal (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12372436 
] 

Jasha Joachimsthal commented on COCOON-1818:


This fix will cause other problems (the result tag is not always present, e.g. 
when the smtp host is incorrect). I am working on it, hope to post something 
asap.

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug
>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: sendmail-exceptions.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (COCOON-1818) SendMailTransformer misses closing tag when recipient address is malformed

2006-03-29 Thread Jean-Baptiste Quenot (JIRA)
[ 
http://issues.apache.org/jira/browse/COCOON-1818?page=comments#action_12372389 
] 

Jean-Baptiste Quenot commented on COCOON-1818:
--

Simone, it's a very good idea to propagate exceptions.  Indeed it makes no 
sense to catch the exceptions and report them in the pipeline result.  The same 
applies to many Cocoon components, like SQLTransformer.

> SendMailTransformer misses closing tag when recipient address is malformed
> --
>
>  Key: COCOON-1818
>  URL: http://issues.apache.org/jira/browse/COCOON-1818
>  Project: Cocoon
> Type: Bug
>   Components: Blocks: Mail
> Reporter: Jasha Joachimsthal
>  Attachments: sendmail-exceptions.diff
>
> When a recipient address contains an illegal character (, ;  [EMAIL 
> PROTECTED]@com etc), an exception is being thrown by method sendMail(List 
> newAddresses, Transport trans).
> The execution of the try in method sendMail() is stopped which may have 
> created a  tag. 
> No  end tag is created when this occurs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira