aspose file tools*
The moose likes Beginning Java and the fly likes General question how does email client knows about incoming mail? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "General question how does email client knows about incoming mail?" Watch "General question how does email client knows about incoming mail?" New topic
Author

General question how does email client knows about incoming mail?

Meir Yan
Ranch Hand

Joined: Apr 27, 2006
Posts: 597
Hello all ( im not sure this is the right form ,sorry)
i need to write simple client that connects to the email server and will know when serten email
massage is arriving ,
my question is how does the ordinary email clients works and know that
email are arriving ?
i have the code and every thing but i miss the way to how to implement this part .
i dont know if the idea of connection every N seconds to the email server will be the right idea.
does they check every N seconds the server or they have some of other method to do this?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Meir Yan:
i dont know if the idea of connection every N seconds to the email server will be the right idea.
does they check every N seconds the server or they have some of other method to do this?


That's exactly how they do it (it's called "pulling") - although it's probably a better idea to do it every couple of minutes instead of seconds. Most email clients allow you to configure the interval.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: General question how does email client knows about incoming mail?