Package com.axelor.mail
Class AbstractMailAccount
- java.lang.Object
-
- com.axelor.mail.AbstractMailAccount
-
- All Implemented Interfaces:
MailAccount
- Direct Known Subclasses:
ImapAccount,Pop3Account
public abstract class AbstractMailAccount extends Object implements MailAccount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.mail.SessiongetSession()Get aSessionfor this account.
The account implementation can decide whether to cache the session instance or not.voidsetConnectionTimeout(int connectionTimeout)Socket connection timeout value in milliseconds.voidsetProperties(Properties properties)Set additional properties.voidsetTimeout(int timeout)Socket read timeout value in milliseconds.
-
-
-
Constructor Detail
-
AbstractMailAccount
public AbstractMailAccount(String protocol, String host, String port, String user, String password, String channel)
Create a new mail account.- Parameters:
protocol- server account protocolhost- server hostnameport- server portuser- login namepassword- login passwordchannel- encryption channel (ssl, starttls or null)
-
-
Method Detail
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
Description copied from interface:MailAccountSocket connection timeout value in milliseconds.- Specified by:
setConnectionTimeoutin interfaceMailAccount- Parameters:
connectionTimeout- timeout value
-
setTimeout
public void setTimeout(int timeout)
Description copied from interface:MailAccountSocket read timeout value in milliseconds.- Specified by:
setTimeoutin interfaceMailAccount- Parameters:
timeout- timeout value
-
setProperties
public void setProperties(Properties properties)
Description copied from interface:MailAccountSet additional properties.- Specified by:
setPropertiesin interfaceMailAccount- Parameters:
properties- the properties to set
-
getSession
public javax.mail.Session getSession()
Description copied from interface:MailAccountGet aSessionfor this account.
The account implementation can decide whether to cache the session instance or not.- Specified by:
getSessionin interfaceMailAccount- Returns:
- a
Sessioninstance.
-
-