Hello Friends,
We are planning to design an e-mail notification system with following requirement considerations:
1. Email notification will be event based e.g. Adddress Changs etc.
2. Certain events will have higher priority against other events in such a case mails for higher priority events should be sent first and for low or medeium pririty events should be sent later.
3. Bulk emails should be queued and then sent across to SMTP server. The load should be evenly balanced.
4.There should be a logging mechanism to track the status of emails sent (delivered, failure, bounced).basically we should get a status of mail(s)sent logging to file/database will not be an issue once we get status from SMTP Server.
5. Email notification should run as a common service that can be used by multiple applications.
6. The service should spawn a new
thread for every event resulting into an email notification.
I have following queries regarding technical design related with above scenario
1. Does this design requires Job Scheduler to schedule mail sending activity at regular intervals. If yes can I use Timer related API in java.util package or there is any other alternative.
2. Is ir possible to expose this module as web service so that multiple applications can access this. Is it a good design that when multiple threads are spawned for each email notification request thread accesses this web service
3. How to get the status from SMTP server to know what is the status of the mail which was sent to it.
Thanks,
Shriniwas