All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----MSBMail.PopServer
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
public int popPort
POP port. The default is 110.
public ProgressSMTPListener liste
This listener receives the status of the connection when it changes, it sould only be used for feedback (visualization) purposes.
public int msgs
number of messages in the mailbox. This value is available after connection.
public PopServer()
creates a new popserver.
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).
public boolean deleteMsg(int num)
delete a message in the mailbox.
public boolean disconnect()
disconnects from the server.
public MailMsg parseMsg(boolean InPart, MailMsgPart parentPart)
internal use. It is used to parse the mime content of a message or part.
public MailMsg retrieveMsg(int num)
retrieves a message from the mailbox.
All Packages Class Hierarchy This Package Previous Next Index