public abstract class AbstractMailManager extends Object
http://java.sun.com/products/javamail/}| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractMailManager.PasswordDocument |
protected static class |
AbstractMailManager.PopupAuthenticator |
protected static class |
AbstractMailManager.SilentAuthenticator |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
protected int |
port |
protected String |
socketFactoryClass |
protected String |
socketFactoryFallback |
protected String |
starttls |
protected int |
timeoutSMTP |
protected boolean |
useOnlyUSASCII |
| Constructor and Description |
|---|
AbstractMailManager() |
| Modifier and Type | Method and Description |
|---|---|
javax.mail.Message[] |
checkMail(String password,
boolean deleteMessages) |
int |
checkMailFolder(String password,
String folderName) |
javax.mail.Message |
createHTMLMessage(javax.mail.Session s,
String from,
String to,
String subject,
String text) |
javax.mail.Message |
createMessage(boolean auth,
String from,
String[] to,
String subject,
String text)
Creates a
Message class instance using the entry parameters. |
javax.mail.Message |
createMessage(boolean auth,
String from,
String to,
String subject,
String text)
Creates a
Message class instance using the entry parameters. |
javax.mail.Message |
createMessage(javax.mail.Session s) |
javax.mail.Message |
createMessage(javax.mail.Session session,
String from,
String[] to,
String subject,
String text)
Creates a
Message class instance using the entry parameters. |
javax.mail.Message |
createMessage(javax.mail.Session session,
String from,
String[] to,
String subject,
String text,
String[] attachment)
Creates a
Message class instance using the entry parameters. |
javax.mail.Message |
createMessage(javax.mail.Session session,
String from,
String to,
String subject,
String text)
Creates a
Message class instance using the entry parameters. |
javax.mail.Message |
createMultipartMessage(javax.mail.Session s,
String from,
String to,
String subject,
String text) |
javax.mail.Address |
getAddress(String mailAddress) |
javax.mail.Address |
getAddress(String mailAddress,
String name) |
javax.mail.Authenticator |
getAuthenticator() |
String |
getMailServer() |
Hashtable |
getMessageInfo(javax.mail.Message message)
Get a Hashtable with the information of each part of the message.
|
javax.mail.Session |
getNewSession(String mailServer,
String userName) |
int |
getPort() |
javax.mail.Session |
getSession(String mailServer) |
javax.mail.Session |
getSession(String mailServer,
String userName) |
javax.mail.Session |
getSessionWithSMTPAuth(String mailServer,
String userName) |
String |
getSocketFactoryClass() |
String |
getSocketFactoryFallback() |
String |
getStarttls() |
javax.mail.Store |
getStore() |
javax.mail.Store |
getStore(String provider) |
String |
getUserName() |
void |
send(javax.mail.Message message) |
void |
send(javax.mail.Message[] messages,
boolean auth) |
void |
send(String from,
String[] to,
String subject,
String text,
String[] filename,
boolean auth) |
void |
send(String from,
String to,
String subject,
String text) |
void |
send(String from,
String to,
String subject,
String text,
boolean auth) |
void |
sendHTMLMessage(String from,
String to,
String subject,
String html) |
void |
setAuthenticator(javax.mail.Authenticator a) |
void |
setMailServer(String mailServer) |
void |
setPort(int port) |
void |
setSMTPTimeout(int timeout) |
void |
setSocketFactoryClass(String socketFactoryClass) |
void |
setSocketFactoryFallback(String socketFactoryFallback) |
void |
setStarttls(String starttls) |
void |
setUseAuth(boolean useAuth) |
void |
setUseOnlyUSASCII(boolean b) |
void |
setUserName(String userName) |
public static boolean DEBUG
protected int timeoutSMTP
protected int port
protected String starttls
protected String socketFactoryFallback
protected String socketFactoryClass
protected boolean useOnlyUSASCII
public String getSocketFactoryFallback()
public void setSocketFactoryFallback(String socketFactoryFallback)
public String getSocketFactoryClass()
public void setSocketFactoryClass(String socketFactoryClass)
public int getPort()
public void setPort(int port)
public String getStarttls()
public void setStarttls(String starttls)
public void setAuthenticator(javax.mail.Authenticator a)
public void setUserName(String userName)
public void setMailServer(String mailServer)
public String getUserName()
public String getMailServer()
public javax.mail.Authenticator getAuthenticator()
public javax.mail.Message createMessage(javax.mail.Session s)
public javax.mail.Session getSession(String mailServer)
public javax.mail.Session getSessionWithSMTPAuth(String mailServer, String userName)
public javax.mail.Address getAddress(String mailAddress, String name) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic javax.mail.Address getAddress(String mailAddress) throws javax.mail.internet.AddressException
javax.mail.internet.AddressExceptionpublic javax.mail.Message createMessage(javax.mail.Session session,
String from,
String to,
String subject,
String text)
throws javax.mail.MessagingException
Message class instance using the entry parameters.session - Sessionfrom - Message sourceto - Message destinysubject - String with the message subject.text - String with the message contained.Messagejavax.mail.MessagingExceptionpublic javax.mail.Message createMessage(javax.mail.Session session,
String from,
String[] to,
String subject,
String text)
throws javax.mail.MessagingException
Message class instance using the entry parameters.
This Message could have multiple destinies.session - Sessionfrom - Message sourceto - Message destiniessubject - String with the message subject.text - String with the message contained.javax.mail.MessagingExceptionpublic javax.mail.Message createMessage(boolean auth,
String from,
String to,
String subject,
String text)
throws javax.mail.MessagingException
Message class instance using the entry parameters.auth - boolean to indicates when the authentication is requiredfrom - Message sourceto - Message destinysubject - String with the message subject.text - String with the message contained.javax.mail.MessagingExceptionpublic javax.mail.Message createMessage(boolean auth,
String from,
String[] to,
String subject,
String text)
throws javax.mail.MessagingException
Message class instance using the entry parameters.
This Message could have multiple destinies.auth - true is the authentication is required.from - Message sourceto - Message destiniessubject - String with the message subject.text - String with the message contained.javax.mail.MessagingExceptionpublic javax.mail.Message createMultipartMessage(javax.mail.Session s,
String from,
String to,
String subject,
String text)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic javax.mail.Message createMessage(javax.mail.Session session,
String from,
String[] to,
String subject,
String text,
String[] attachment)
throws javax.mail.MessagingException
Message class instance using the entry parameters.
This Message could have attachment files.session - Sessionfrom - Message sourceto - Message destiniessubject - String with the message subject.text - String with the message contained.attachment - File paths to be attached.javax.mail.MessagingExceptionpublic javax.mail.Message createHTMLMessage(javax.mail.Session s,
String from,
String to,
String subject,
String text)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void send(String from, String to, String subject, String text) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void send(String from, String to, String subject, String text, boolean auth) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void send(String from, String[] to, String subject, String text, String[] filename, boolean auth) throws Exception
Exceptionpublic void send(javax.mail.Message message)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void send(javax.mail.Message[] messages,
boolean auth)
throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic void sendHTMLMessage(String from, String to, String subject, String html) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic javax.mail.Store getStore()
throws javax.mail.NoSuchProviderException,
javax.mail.MessagingException
javax.mail.NoSuchProviderExceptionjavax.mail.MessagingExceptionpublic javax.mail.Store getStore(String provider) throws javax.mail.NoSuchProviderException, javax.mail.MessagingException
javax.mail.NoSuchProviderExceptionjavax.mail.MessagingExceptionpublic void setUseAuth(boolean useAuth)
public void setSMTPTimeout(int timeout)
public void setUseOnlyUSASCII(boolean b)
public javax.mail.Message[] checkMail(String password, boolean deleteMessages)
public Hashtable getMessageInfo(javax.mail.Message message) throws Exception
message - Message to get the information from.ExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.