• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Best approach for checking new messages in multiple mail accounts periodically?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I want to write an application which monitors multiple mail accounts on the same server for new messages periodically. Could you give me the best performance approach?
[ October 20, 2004: Message edited by: Le Ngoc Quoc Khanh ]
 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is way too broad...you need more details. Are you using JavaMail? Have you set up this mail server yet?
 
Le Ngoc Quoc Khanh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stephen Huey:
Your question is way too broad...you need more details. Are you using JavaMail? Have you set up this mail server yet?



I'm using JavaMail and already have an Mail Server with only POP3 support for checking mail. Wait for your reply. Thanks.
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming you are not deleting the messages from the POP3 server then you can use the UIDL command to return the unique server hash for each message and compare this to hashes stored locally to see if any new messages exist.

If you are deleting messages then simply use the STAT command to get the message count. If the message count is 0 then you don't have any new messages.
 
Le Ngoc Quoc Khanh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Van Glass:
Assuming you are not deleting the messages from the POP3 server then you can use the UIDL command to return the unique server hash for each message and compare this to hashes stored locally to see if any new messages exist.

If you are deleting messages then simply use the STAT command to get the message count. If the message count is 0 then you don't have any new messages.



Thank you very much
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic