|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ezprotocols.ezpop.EzPOP
EzPOP implements a POP3 client to retrieve e-mail from a Post Office
Protocol (POP3) Server. Retrieving electronic mail has never been so easy!
Example:
import com.EzProtocols.ezpop.*;
// EzPOP Example : Retreives, prints and deletes all
//e-mail from a POP Server.
public class GetMail {
public static void main(String[] args) {
try{
EzPOP ezPop = new EzPOP();
//Set EzPOP component.
ezPop.setMailServer("your.pop.server");
ezPop.setUsername("username);
ezPop.setPassword("secret");
//Automatically delete mail after retreiving it.
ezPop.setDelete(true);
//Connects to POP Server.
ezPop.connect();
System.out.println("There is " + ezPop.getMessageCount() +
" mail(s) in the mailbox.");
//Prints the content of all messages.
Message[] messages = ezPop.getAllMessages();
for(int i = 0; i< messages.length; i++){
System.out.println("-Mail " + (i+1) +
" -\n" + messages[i]);
}
//Disconnects from POP Server.
ezPop.disconnect();
}catch(EzPOPException ex){
System.out.println(ex.getMessage());
}
}
}
| Constructor Summary | |
EzPOP()
Creates a new instance of EzPOP. |
|
| Method Summary | |
void |
addEzPOPEventListener(EzPOPEventListener client)
Registers to receive events (serverReply). |
void |
connect()
Connects to POP Server. |
void |
deleteMessage(int message)
Deletes a message in the mailbox. |
void |
disconnect()
Disconnects from the POP Server. |
java.lang.String |
getAbout()
Gets information about EzPOP. |
Message[] |
getAllMessages()
Gets all message(s) in the mailbox. |
boolean |
getConnected()
Indicates if currently connected to the POP Server. |
int |
getMailPort()
Gets the POP Server port number. |
java.lang.String |
getMailServer()
Gets the POP server address. |
Message |
getMessage(int message)
Gets a specific message from the mailbox. |
int |
getMessageCount()
Gets the number of messages in the mailbox. |
java.lang.String |
getMessageUIDL(int message)
Gets the UIDL of a message. |
java.lang.String |
getPassword()
Gets the user password used for authentication. |
java.lang.String |
getSerialKey()
Gets the Serial Key used to activate the full version. |
int |
getTimeout()
Gets the Timeout to open the connection with the SMTP Server. |
java.lang.String |
getTopOfMessage(int message,
int nbLines)
Gets summary of a message in the mailbox. |
java.lang.String |
getUsername()
Gets the username used for authentication. |
java.lang.String |
getVersion()
Gets the version number of EzPOP. |
boolean |
isDelete()
Indicates if EzPOP automatically deletes a message after reading it. |
void |
removeEzPOPEventListener(EzPOPEventListener client)
UnRegisters from receiving events. |
void |
setAbout(java.lang.String s)
|
void |
setDelete(boolean d)
Determines if EzPOP automatically deletes a message after reading it. |
void |
setMailPort(int port)
Sets the SMTP Server port (Default is 110). |
void |
setMailServer(java.lang.String s)
Sets the address of the POP Server. |
void |
setPassword(java.lang.String p)
Sets the user password for authentication with the POP Server. |
void |
setSerialKey(java.lang.String k)
Sets the Serial Key to activate the full version. |
void |
setTimeout(int t)
Sets the Timeout to open the connection with the SMTP Server. |
void |
setUsername(java.lang.String u)
Sets the username for authentication with the POP Server. |
void |
setVersion(java.lang.String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EzPOP()
| Method Detail |
public void connect()
throws EzPOPException
public int getMessageCount()
throws EzPOPException
public java.lang.String getMessageUIDL(int message)
throws EzPOPException
public java.lang.String getTopOfMessage(int message,
int nbLines)
throws EzPOPException
public Message getMessage(int message)
throws EzPOPException
public Message[] getAllMessages()
throws EzPOPException
public void deleteMessage(int message)
throws EzPOPException
public void disconnect()
throws EzPOPException
public void addEzPOPEventListener(EzPOPEventListener client)
public void removeEzPOPEventListener(EzPOPEventListener client)
public void setVersion(java.lang.String s)
public void setAbout(java.lang.String s)
public void setSerialKey(java.lang.String k)
public void setMailServer(java.lang.String s)
public void setUsername(java.lang.String u)
public void setTimeout(int t)
public void setPassword(java.lang.String p)
public void setMailPort(int port)
public void setDelete(boolean d)
public boolean getConnected()
public java.lang.String getUsername()
public java.lang.String getPassword()
public java.lang.String getMailServer()
public int getMailPort()
public java.lang.String getVersion()
public int getTimeout()
public java.lang.String getAbout()
public java.lang.String getSerialKey()
public boolean isDelete()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||