• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Le Ngoc Quoc Khanh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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 ]
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Van Glass
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!