Bug 25190 - waitUntilSent attribute for send tag
Summary: waitUntilSent attribute for send tag
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Mailer Taglib (show other bugs)
Version: 1.1
Hardware: All other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2003-12-04 06:34 UTC by Francis McKenzie
Modified: 2009-11-29 19:39 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Francis McKenzie 2003-12-04 06:34:58 UTC

Could you add an extra attribute to the send tag called something 
like 'waitUntilSent'.

This would force the mail to be sent in the current thread, rather than firing 
off another thread to do the send in the background.

This would be useful because sometimes we want to check there and then if the 
mail went off ok. If not, we want to report the errors to the user directly on 
the JSP page.

'waitUntilSent' would default to false - thereby preserving the existing 
behaviour. It would provide the extra flexibility for developers to report any 
errors directly to the user that take place in the Transport.send(message) 
Comment 1 Marc Guillemot 2004-02-27 13:39:12 UTC
I think such a change would make sense. But I think that the <mt:send/> tag is
useless: if a jsp page uses <mt:mail... it means that a mail should be sent,
therefore, no need to say again that the mail should be sent.

My proposition would be:
- add something like 'waitUntilSent' (as described in the original description
of this bug report) to the <mt:mail...> tag
- remove the <mt:sent/> tag
- trigger mail sending in doEndTag of the <mt:mail> tag if no <error> tag is
present or in the doBeginTag of <mt:error> if it is present
Comment 2 Felipe Leme 2004-03-24 22:25:13 UTC
I agree with the need of such attribute, although 'waitUntilSent' sounds a weird
name to me (maybe something like backgroundProcess, backgroundThread or
separatedThread would be better).

Regarding <mt:send>, it really seems unecessarily. Maybe it would make if we
could save the message for sending later, but in this case we would need a 'var'
attribute on <mt:mail>. Anyway, we shouldn't remove it, because it would break
backward compatibilty - let's just keep it, without any effect (other then a
System.err message warning about using a deprecated tag)
Comment 3 Martin Cooper 2004-03-24 22:36:40 UTC
Felipe, you read my mind! That is exactly what I intend to do with the <mail> 
and <send> tags in Mailer 2.0.
Comment 4 Marc Guillemot 2004-03-26 13:04:46 UTC
Doing it first in 2.0 has as consequence that it can't be really removed before
3.0. Right?
Comment 5 Martin Cooper 2004-03-27 00:26:51 UTC
Um, yeah. You're concerned about removing it already? ;-)
Comment 6 Henri Yandell 2009-11-29 19:39:45 UTC
Resolving. Taglib has been retired.