public class SmtpAccount extends Object implements MailAccount
MailAccount for SMPT accounts.| Constructor and Description |
|---|
SmtpAccount(String host,
String port)
Create a non-authenticating SMTP account.
|
SmtpAccount(String host,
String port,
String user,
String password)
Create an authenticating SMTP account.
|
SmtpAccount(String host,
String port,
String user,
String password,
String channel)
Create an authenticating SMTP account.
|
| Modifier and Type | Method and Description |
|---|---|
Session |
getSession()
Get a
Session for this account.The account implementation can decide whether to cache the session instance or not. |
void |
setConnectionTimeout(int connectionTimeout)
Socket connection timeout value in milliseconds.
|
void |
setProperties(Properties properties)
Set additional properties.
|
void |
setTimeout(int timeout)
Socket read timeout value in milliseconds.
|
public SmtpAccount(String host, String port)
host - the smtp server hostport - the smtp server portpublic SmtpAccount(String host, String port, String user, String password)
host - the smtp server hostport - the smtp server portuser - the smtp server login user namepassword - the smtp server login passwordpublic SmtpAccount(String host, String port, String user, String password, String channel)
host - the smtp server hostport - the smtp server portuser - the smtp server login user namepassword - the smtp server login passwordchannel - the smtp encryption channel (starttls or ssl)public void setConnectionTimeout(int connectionTimeout)
MailAccountsetConnectionTimeout in interface MailAccountconnectionTimeout - timeout valuepublic void setTimeout(int timeout)
MailAccountsetTimeout in interface MailAccounttimeout - timeout valuepublic void setProperties(Properties properties)
MailAccountsetProperties in interface MailAccountproperties - the properties to setpublic Session getSession()
MailAccountSession for this account.getSession in interface MailAccountSession instance.