All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class MSBMail.PopServer

java.lang.Object
   |
   +----MSBMail.PopServer

public class PopServer
extends Object

The POP server class is used to retrieve messages from a POP3 server. It returns one object of type MailMsg for each message in the mailbox.

Example:

pop.connect("pop.mycompany.com","user","pwd");  // Connect
for (int i=1;i<=pop.msgs;i++) {    // iterate on number of messages
   MailMsg m=pop.retrieveMsg(i);             // get message
   pop.deleteMsg(i);                    // delete message

   // do here whatever you like with the MailMsg object (variable m)
}
pop.disconnect();                       // disconnect

 


Variable Index

 o liste
 o msgs
 o popPort

Constructor Index

 o PopServer()

Method Index

 o connect(String, String, String)
 o deleteMsg(int)
 o disconnect()
 o parseMsg(boolean, MailMsgPart)
 o retrieveMsg(int)

Variables

 o popPort
 public int popPort
POP port. The default is 110.
 o liste
 public ProgressSMTPListener liste

This listener receives the status of the connection when it changes, it sould only be used for feedback (visualization) purposes.

 o msgs
 public int msgs
number of messages in the mailbox. This value is available after connection.

Constructors

 o PopServer
 public PopServer()
creates a new popserver.

Methods

 o connect
 public boolean connect(String serverAdd,
                        String userName,
                        String userPwd)

connects and gets the number of messages in the mailbox. The parameters are, the server address (e.g. pop.mycompany.com, the user name and the password).

 

 o deleteMsg
 public boolean deleteMsg(int num)
delete a message in the mailbox.
 
 o disconnect
 public boolean disconnect()
disconnects from the server.
 o parseMsg
 public MailMsg parseMsg(boolean InPart,
                         MailMsgPart parentPart)
internal use. It is used to parse the mime content of a message or part.
 o retrieveMsg
 public MailMsg retrieveMsg(int num)
 
retrieves a message from the mailbox.

All Packages  Class Hierarchy  This Package  Previous  Next  Index