public class EmailAccount
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Properties |
props
All settings are stored in standard javax.mail...
|
Constructor and Description |
---|
EmailAccount()
Create a new EmailAccount.
|
EmailAccount(java.util.Properties props)
Create an account with initial properties.
|
EmailAccount(java.lang.String filename)
Create a new EmailAccount.
|
EmailAccount(java.lang.String user,
java.lang.String password,
java.lang.String sender,
java.lang.String smtphost,
java.lang.Integer smtpport,
boolean ssl,
boolean starttls,
java.lang.String receivehost,
java.lang.String receiveprotocol,
boolean noauth)
Create a new account.
|
Modifier and Type | Method and Description |
---|---|
static EmailAccount |
createAccount(java.lang.String filename,
java.lang.ClassLoader cl)
Read account data from property file.
|
java.lang.String |
getPassword()
Get the password.
|
java.util.Properties |
getProperties()
Get the properties.
|
java.lang.String |
getReceiveHost()
Get the receivehost.
|
java.lang.String |
getReceiveProtocol()
Get the receiveprotocol.
|
java.lang.String |
getSender()
Get the sender.
|
java.lang.String |
getSmtpHost()
Get host.
|
java.lang.Integer |
getSmtpPort()
Get the port.
|
java.lang.String |
getUser()
Get the user.
|
boolean |
isNoAuthentication()
Get the noAuthentication.
|
boolean |
isSsl()
Is ssl connection?
|
boolean |
isStartTls()
Get the starttls.
|
void |
readAccount(java.io.InputStream is)
Read account data from property file.
|
void |
readAccount(java.lang.String filename)
Read account data from property file.
|
void |
setNoAuthentication(boolean noauth)
Set the noAuthentication.
|
void |
setPassword(java.lang.String password)
Set the password.
|
void |
setProperties(java.util.Properties props)
Set the properties.
|
void |
setReceiveHost(java.lang.String receivehost)
Set the receivehost.
|
void |
setReceiveProtocol(java.lang.String receiveprotocol)
Set the receiveprotocol.
|
void |
setSender(java.lang.String sender)
Set the sender.
|
void |
setSmtpHost(java.lang.String host)
Set the host.
|
void |
setSmtpPort(java.lang.Integer port)
Set the port.
|
void |
setSsl(boolean ssl)
Set the ssl connection property.
|
void |
setStartTls(boolean starttls)
Set the starttls.
|
void |
setUser(java.lang.String user)
Set the user.
|
void |
writeAccount(java.lang.String filename)
Store data to a property file.
|
protected java.util.Properties props
public EmailAccount()
public EmailAccount(java.lang.String filename)
public EmailAccount(java.util.Properties props)
public EmailAccount(java.lang.String user, java.lang.String password, java.lang.String sender, java.lang.String smtphost, java.lang.Integer smtpport, boolean ssl, boolean starttls, java.lang.String receivehost, java.lang.String receiveprotocol, boolean noauth)
smtphost
- The smtp host.port
- The smtp port.user
- The user name.password
- The password.sender
- The sender email.ssl
- Flag for ssl.public java.util.Properties getProperties()
public void setProperties(java.util.Properties props)
public java.lang.String getSmtpHost()
public void setSmtpHost(java.lang.String host)
host
- The host.public java.lang.Integer getSmtpPort()
public void setSmtpPort(java.lang.Integer port)
port
- The port.public java.lang.String getUser()
public void setUser(java.lang.String user)
user
- The user.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The password.public java.lang.String getSender()
public void setSender(java.lang.String sender)
sender
- The sender.public boolean isSsl()
public void setSsl(boolean ssl)
ssl
- Flag indicating ssl.public boolean isStartTls()
public void setStartTls(boolean starttls)
starttls
- The starttls to set.public java.lang.String getReceiveHost()
public void setReceiveHost(java.lang.String receivehost)
receivehost
- The receivehost to set.public java.lang.String getReceiveProtocol()
public void setReceiveProtocol(java.lang.String receiveprotocol)
receiveprotocol
- The receiveprotocol to set.public boolean isNoAuthentication()
public void setNoAuthentication(boolean noauth)
noAuthentication
- The noAuthentication to setpublic void writeAccount(java.lang.String filename)
public void readAccount(java.lang.String filename)
public static EmailAccount createAccount(java.lang.String filename, java.lang.ClassLoader cl)
public void readAccount(java.io.InputStream is)