Hi, 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) step.
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
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)
Felipe, you read my mind! That is exactly what I intend to do with the <mail> and <send> tags in Mailer 2.0.
Doing it first in 2.0 has as consequence that it can't be really removed before 3.0. Right?
Um, yeah. You're concerned about removing it already? ;-)
Resolving. Taglib has been retired.