public abstract class MailClient extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_IMAP |
static int |
TYPE_POP3 |
Constructor and Description |
---|
MailClient(String server,
int port,
String username,
String password,
boolean secure)
constructor of the class
|
Modifier and Type | Method and Description |
---|---|
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) |
static MailClient |
getInstance(int type,
String server,
int port,
String username,
String password,
boolean secure) |
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) |
public static final int TYPE_POP3
public static final int TYPE_IMAP
public MailClient(String server, int port, String username, String password, boolean secure)
server
- port
- username
- password
- public static MailClient getInstance(int type, String server, int port, String username, String password, boolean secure)
public static MailClient getInstance(int type, String server, int port, String username, String password)
public void setMaxrows(int maxrows)
maxrows
- The maxrows to set.public void setStartrow(int startrow)
startrow
- The startrow to set.public void setTimeout(int timeout)
timeout
- The timeout to set.public void setUniqueFilenames(boolean uniqueFilenames)
uniqueFilenames
- The uniqueFilenames to set.public void setAttachmentDirectory(Resource attachmentDirectory)
attachmentDirectory
- The attachmentDirectory to set.public void connect() throws javax.mail.MessagingException
javax.mail.MessagingException
public void deleteMails(String[] as, String[] as1) throws javax.mail.MessagingException, IOException
messageNumbers
- uIds
- javax.mail.MessagingException
IOException
public Query getMails(String[] messageNumbers, String[] uids, boolean all) throws javax.mail.MessagingException, IOException
messageNumbers
- all messages with this idsuIds
- all messages with this uidswithBody
- also return bodyjavax.mail.MessagingException
IOException
public void disconnectEL()
Copyright © 2015 Lucee