railo.runtime.net.mail
Class MailClient

java.lang.Object
  extended by railo.runtime.net.mail.MailClient
Direct Known Subclasses:
ImapClient, PopClient

public abstract class MailClient
extends Object


Field Summary
static int TYPE_IMAP
           
static int TYPE_POP3
           
 
Constructor Summary
MailClient(String server, int port, String username, String password)
          constructor of the class
 
Method Summary
 void connect()
          connects to pop server
 void deleteMails(String[] as, String[] as1)
          delete all message in ibox that match given criteria
 void disconnectEL()
          disconnect without a exception
static MailClient getInstance(int type, String server, int port, String username, String password)
           
 Query getMails(String[] messageNumbers, String[] uids, boolean all)
          return all messages from inbox
 void setAttachmentDirectory(Resource attachmentDirectory)
           
 void setMaxrows(int maxrows)
           
 void setStartrow(int startrow)
           
 void setTimeout(int timeout)
           
 void setUniqueFilenames(boolean uniqueFilenames)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_POP3

public static final int TYPE_POP3
See Also:
Constant Field Values

TYPE_IMAP

public static final int TYPE_IMAP
See Also:
Constant Field Values
Constructor Detail

MailClient

public MailClient(String server,
                  int port,
                  String username,
                  String password)
constructor of the class

Parameters:
server -
port -
username -
password -
Method Detail

getInstance

public static MailClient getInstance(int type,
                                     String server,
                                     int port,
                                     String username,
                                     String password)

setMaxrows

public void setMaxrows(int maxrows)
Parameters:
maxrows - The maxrows to set.

setStartrow

public void setStartrow(int startrow)
Parameters:
startrow - The startrow to set.

setTimeout

public void setTimeout(int timeout)
Parameters:
timeout - The timeout to set.

setUniqueFilenames

public void setUniqueFilenames(boolean uniqueFilenames)
Parameters:
uniqueFilenames - The uniqueFilenames to set.

setAttachmentDirectory

public void setAttachmentDirectory(Resource attachmentDirectory)
Parameters:
attachmentDirectory - The attachmentDirectory to set.

connect

public void connect()
             throws javax.mail.MessagingException
connects to pop server

Throws:
javax.mail.MessagingException

deleteMails

public void deleteMails(String[] as,
                        String[] as1)
                 throws javax.mail.MessagingException,
                        IOException
delete all message in ibox that match given criteria

Parameters:
messageNumbers -
uIds -
Throws:
javax.mail.MessagingException
IOException

getMails

public Query getMails(String[] messageNumbers,
                      String[] uids,
                      boolean all)
               throws javax.mail.MessagingException,
                      IOException
return all messages from inbox

Parameters:
messageNumbers - all messages with this ids
uIds - all messages with this uids
withBody - also return body
Returns:
all messages from inbox
Throws:
javax.mail.MessagingException
IOException

disconnectEL

public void disconnectEL()
disconnect without a exception



Copyright © 2012 Railo