> I need to send out emails from a struts app. > > Any comments on the best way to go about this?
Yes, use JavaMail: http://java.sun.com/products/javamail/ http://www.j2eeolympus.com/J2EE/JavaMail/JavaMail.jsp > > As sending mail can be slow, is there an easy way to do this in the > background? That depends entirely on your requirements. I supposed you could use anything from kicking off another thread [0] to using JMS [1] to queue up some mail process. [0] http://java.sun.com/docs/books/tutorial/essential/threads/ [1] http://www.j2eeolympus.com/J2EE/JMS/JMS.jsp > > What happens if a client cancels a request part way through? is there any > way to handle this / ignore cancels? "part way through".....there's no such animal. Once the page is submitted or a link is clicked, you (server side) have no control over it. At best, the browser may send a disconnect if the user hits the stop button or closes the browser abruptly, but that's not guaranteed and is VERY browser specific. Even if you were lucky enough to dictate the browser and version, you will never see it get past the container. As I have told other people, I would give up on that requirement, unless you want to "roll your own browser" like my current gig is doing[3]. [3] http://www.mozilla.org/unix/customizing.html -- James Mitchell Software Engineer / Open Source Evangelist AIM: jmitchtx --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]