com.icegreen.greenmail.util
Class Retriever

java.lang.Object
  extended by com.icegreen.greenmail.util.Retriever

public class Retriever
extends Object

Since:
Apr 16, 2005
Version:
$Id: $
Author:
Wael Chatila

Field Summary
static String PROTOCOL_IMAP
           
static String PROTOCOL_IMAPS
           
static String PROTOCOL_POP3
           
static String PROTOCOL_POP3S
           
 
Constructor Summary
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
 Message[] getMessages(String account)
           
 Message[] getMessages(String account, String password)
           
 void logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_POP3

public static final String PROTOCOL_POP3
See Also:
Constant Field Values

PROTOCOL_POP3S

public static final String PROTOCOL_POP3S
See Also:
Constant Field Values

PROTOCOL_IMAP

public static final String PROTOCOL_IMAP
See Also:
Constant Field Values

PROTOCOL_IMAPS

public static final 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 Message[] getMessages(String account)
                      throws Exception
Throws:
Exception

getMessages

public Message[] getMessages(String account,
                             String password)
                      throws Exception
Throws:
Exception

logout

public void logout()