Hi, The one solution I suggest is to using a messaging product like JbossMQ or OpenJMS. You you web application collect the data of the mail and wrap it into an object and send it to the JMS server. Your web application will be free to do another work now.
You can have a Message Drive Bean (MDB) or async client to the JMS. As and when the mail message will arive the MDB or the Async client will automatically pick this up and send it to any server. You can load balance your web application just to collect the the mail information and not to sit in a tight loop for processing the mails. I am using this for a Trading system where the order execution messages are mailed to user. The advantage here is if you have a lot of mail to send they will be put in a queue and you application will always be available for doing the core work. In my opinion, this should be the best solution for your problem Raj Saini ----- Original Message ----- From: "Alex Wallace" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Monday, September 23, 2002 6:22 PM Subject: Tomcat Email - JavaMail Advice. > I need to make a web app that will notify and monitor activity to users by > email, and potentially thousands of users (therefor emails). I want to ask for > advice as to how to handle this. > > Should the web app generate all the emails? May be use another machine as a mail > server (linux with exim?), but have the web app generate them? > > Have the web app just insert all emails to be sent in a database table and have > a separate application monitor the table or have trigers in the db server > (postgresql) that will launc the app (java?) that will send the emails? > > As far as JavaMail, i did a small test with the code in the example in tomcat > (EmailServlet), I tried to send 1000 emails to a server of mine, using localhost > as the smtp server, and around the 70th email, the app complained about a nested > error, the localhost could not be contacted, connection refused, etc. My code > is very simplistic, and I only did a for loop to try to send the same email a > thousand times to the same host. Evidently this doesn't work. I'm very new to > this, so could someone give me some advice on how to send large amounts of > email? Currently using linux (debian woody) with exim. > > Advise in all aspects of this email is greatly appreciated. > > Thank you in advance! > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
