wood burning stoves 2.0*
The moose likes Servlets and the fly likes E-mail Notification Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "E-mail Notification Service" Watch "E-mail Notification Service" New topic
Author

E-mail Notification Service

Martin Richa
Greenhorn

Joined: Apr 19, 2004
Posts: 4
Hello,
I'd make some e-mail notification service for an already running mail server. Users will have profile defining what parts of the new e-mail is to be sent to them via SMS.
The server is not in Java, and I'd use it.
I'm not sure if it's that efficient to check all of inbox folders for those new e-mails!
Any suggestions?
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Martin,
Have you checked out the JavaMail API? That may be what you are looking for.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Martin Richa
Greenhorn

Joined: Apr 19, 2004
Posts: 4
Hi Nathaniel, and thanks for the reply.
Yes I've been using the JavaMAil API. I developed my own mail server and could not do it without the API.
But here I'm dealing with another mail server, that is already fixed. I am just able to plug my Java engine, if I reach it.
No ideas in my mind, all the APIs are!
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Martin,
I don't understand what you are trying to do. You're confusing me. JavaMail is a client mail API, not a server API. So, you can't developer a mail server with JavaMail. Maybe you can explain more full what you have and what you want so others and I can help you.
Martin Richa
Greenhorn

Joined: Apr 19, 2004
Posts: 4
Yes you are right, and sorry for confusing you. My last project, the mail server, is a server and client so I used the API.
About this work I have to do;
Say the MS Exchange server is running and I want to notify every user for his/her new e-mail via SMS. E-mails are stored in folders, one folder for each user.
I wanna develop my Java agent to check for those new e-mails, get users' profiles (in which I store what users want from his/her new e-mail e.g. To,Date,Subject) and then gather that text and notify those users for their new e-mails. Another agent that recives these text notifications and forwards them via SMS gatway is already built and accepts them on fixed port.
I think of the interval in which I'll be checking those inbox folders, parse the new mail and build the text!
** Sorry my english is not good, it's not my native language.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Martin,
Your english is just fine. I think it's more important that people focus on communicating (listening and talking) than on their skill level. Plus, as somebody that speaks only one language, you're not going to find me complaining when I can't understand somebody's second or third or fourth langauge!
I think I do understand what you're trying to do. All you're asking is what to do to make your query of the mail server efficient for your purposes. You obviously don't want to check for new mail non-stop otherwise the mail server will get bogged down and possibly stop responding. On the other hand you don't want to wait 12 hours before being able to notify somebody they have new mail.
I think your answer lies in what your clients expect. For me, I don't need to know the second I get new mail. But possibly within a few minutes (or 10) would be fine. I'm sure there are more complicated solutions too. For example, you could profile the various mailboxes that you are monitoring. Those you find get more mail, you check more often. Those that don't get very much mail, you check less often. There's lots of play, but it all really has to do with what kind of functionality you are providing. Are you guaranteeing that users will get a notificiation within 3 minutes of getting an email? If so that pretty much answers your question and you could go from there. Well, I think you get the point.
Is that what you are asking?
Martin Richa
Greenhorn

Joined: Apr 19, 2004
Posts: 4
Yes Nathaniel, that's what I'm thinking of.
I got your point, and I'll see what the provider is going to guarantee users! But for sure, I'll not go throw that job of tracking who gets more and check his/her folders faster! Better not to offer that free service at all hahah!
Thanks alot Nathaniel, my Regards.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

Martin, where do the Servlets come into play?
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: E-mail Notification Service