When making a large number of connections (e.g., to a mail server) in ashort amount of time, you might run out of sockets and not be able tocreate any more connections. The existing connections will be in aTIME_WAIT state as shown by netstat. The following articles explainthis situation in more detail and include tips for how to deal withit:
Note that it seems thenumber of available ports has increased in Windows Server 2008.
Windows applications typically store single messages in MIME format in“.eml” files. JavaMail can read these files using the MimeMessageconstructor that takes an InputStream.
Windows applications typically store messages in the Windowsproprietary Outlook message format in “.msg” files. JavaMail can’tprocess these files directly, but theApache POI project might help.