|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.wisesoft.util.mail.PopClient
The POP client class is used to retrieve messages from a POP3 server. It
returns one object of type EmailMessage for each message in the mailbox.
Example:
// Connect pop.connect("pop.aba.com","username","pasword"); // iterate on number of messages for (int i=1;i<=pop.numberMessages;i++) { // get message EnailMessage emailMessage=pop.retrieveMsg(i); // delete message pop.deleteMsg(i); } // disconnect pop.disconnect();
Field Summary | |
boolean |
debug
if true, the class will generate debug messages |
biz.wisesoft.util.mail.JvInterface |
jvint
|
java.lang.String |
msgFile
The file where the received message will be stored. |
int |
numberMessages
number of messages in the mailbox. |
int |
popPort
POP port. |
Constructor Summary | |
PopClient()
The default Constructor |
Method Summary | |
boolean |
connect(java.lang.String serverAdd,
java.lang.String userName,
java.lang.String userPwd)
Connects the Pop3 server |
boolean |
deleteMsg(int num)
Deletes an email from the mailbox |
boolean |
disconnect()
Disconnects from the server. |
long |
getSizeMsg(int num)
Returns the size of the email |
EmailMessage |
retrieveMsg(int num)
Retrieves a message from the mailbox. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int popPort
public biz.wisesoft.util.mail.JvInterface jvint
public int numberMessages
public java.lang.String msgFile
public boolean debug
Constructor Detail |
public PopClient()
Method Detail |
public boolean connect(java.lang.String serverAdd, java.lang.String userName, java.lang.String userPwd)
serverAdd
- Pop3 Server addressuserName
- The username of email accountuserPwd
- The password of email account
public EmailMessage retrieveMsg(int num)
num
- The id of the email
public long getSizeMsg(int num)
num
- The id of the email
public boolean deleteMsg(int num)
num
- The email id
public boolean disconnect()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |