Package com.icegreen.greenmail.util
Class Retriever
- java.lang.Object
-
- com.icegreen.greenmail.util.Retriever
-
public class Retriever extends java.lang.Object
- Since:
- Apr 16, 2005
- Version:
- $Id: $
- Author:
- Wael Chatila
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROTOCOL_IMAP
static java.lang.String
PROTOCOL_IMAPS
static java.lang.String
PROTOCOL_POP3
static java.lang.String
PROTOCOL_POP3S
-
Constructor Summary
Constructors Constructor Description Retriever(AbstractServer server)
Creates a retriever object for a particular server
Example:
GreenMail greenMail = new GreenMail();
...
Retriever r = new Retriever(greenMail.getPop3())
; r.getMessages("bill@microsoft.com");
This will fetch all available messages for Billy using POP3.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.mail.Message[]
getMessages(java.lang.String account)
javax.mail.Message[]
getMessages(java.lang.String account, java.lang.String password)
void
logout()
-
-
-
Field Detail
-
PROTOCOL_POP3
public static final java.lang.String PROTOCOL_POP3
- See Also:
- Constant Field Values
-
PROTOCOL_POP3S
public static final java.lang.String PROTOCOL_POP3S
- See Also:
- Constant Field Values
-
PROTOCOL_IMAP
public static final java.lang.String PROTOCOL_IMAP
- See Also:
- Constant Field Values
-
PROTOCOL_IMAPS
public static final java.lang.String PROTOCOL_IMAPS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Retriever
public Retriever(AbstractServer server)
Creates a retriever object for a particular server
Example:
GreenMail greenMail = new GreenMail();
...
Retriever r = new Retriever(greenMail.getPop3())
; r.getMessages("bill@microsoft.com");
This will fetch all available messages for Billy using POP3.- Parameters:
server
-
-
-
Method Detail
-
getMessages
public javax.mail.Message[] getMessages(java.lang.String account) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getMessages
public javax.mail.Message[] getMessages(java.lang.String account, java.lang.String password) throws java.lang.Exception
- Throws:
java.lang.Exception
-
logout
public void logout()
-
-