Package jadex.bridge.service.types.email
Class EmailAccount
- java.lang.Object
-
- jadex.bridge.service.types.email.EmailAccount
-
public class EmailAccount extends java.lang.ObjectEmail account data. Note, the file format has changed for Jadex 3.0, but still support reading the old format.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.PropertiespropsAll settings are stored in standard javax.mail...
-
Constructor Summary
Constructors Constructor Description EmailAccount()Create a new EmailAccount.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.EmailAccount(java.util.Properties props)Create an account with initial properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EmailAccountcreateAccount(java.lang.String filename, java.lang.ClassLoader cl)Read account data from property file.java.lang.StringgetPassword()Get the password.java.util.PropertiesgetProperties()Get the properties.java.lang.StringgetReceiveHost()Get the receivehost.java.lang.StringgetReceiveProtocol()Get the receiveprotocol.java.lang.StringgetSender()Get the sender.java.lang.StringgetSmtpHost()Get host.java.lang.IntegergetSmtpPort()Get the port.java.lang.StringgetUser()Get the user.booleanisNoAuthentication()Get the noAuthentication.booleanisSsl()Is ssl connection?booleanisStartTls()Get the starttls.voidreadAccount(java.io.InputStream is)Read account data from property file.voidreadAccount(java.lang.String filename)Read account data from property file.voidsetNoAuthentication(boolean noauth)Set the noAuthentication.voidsetPassword(java.lang.String password)Set the password.voidsetProperties(java.util.Properties props)Set the properties.voidsetReceiveHost(java.lang.String receivehost)Set the receivehost.voidsetReceiveProtocol(java.lang.String receiveprotocol)Set the receiveprotocol.voidsetSender(java.lang.String sender)Set the sender.voidsetSmtpHost(java.lang.String host)Set the host.voidsetSmtpPort(java.lang.Integer port)Set the port.voidsetSsl(boolean ssl)Set the ssl connection property.voidsetStartTls(boolean starttls)Set the starttls.voidsetUser(java.lang.String user)Set the user.voidwriteAccount(java.lang.String filename)Store data to a property file.
-
-
-
Constructor Detail
-
EmailAccount
public EmailAccount()
Create a new EmailAccount.
-
EmailAccount
public EmailAccount(java.lang.String filename)
Create a new EmailAccount.
-
EmailAccount
public EmailAccount(java.util.Properties props)
Create an account with initial properties.
-
EmailAccount
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)Create a new account.- Parameters:
smtphost- The smtp host.port- The smtp port.user- The user name.password- The password.sender- The sender email.ssl- Flag for ssl.
-
-
Method Detail
-
getProperties
public java.util.Properties getProperties()
Get the properties.
-
setProperties
public void setProperties(java.util.Properties props)
Set the properties.
-
getSmtpHost
public java.lang.String getSmtpHost()
Get host.- Returns:
- The host.
-
setSmtpHost
public void setSmtpHost(java.lang.String host)
Set the host.- Parameters:
host- The host.
-
getSmtpPort
public java.lang.Integer getSmtpPort()
Get the port.- Returns:
- The port.
-
setSmtpPort
public void setSmtpPort(java.lang.Integer port)
Set the port.- Parameters:
port- The port.
-
getUser
public java.lang.String getUser()
Get the user.- Returns:
- The user.
-
setUser
public void setUser(java.lang.String user)
Set the user.- Parameters:
user- The user.
-
getPassword
public java.lang.String getPassword()
Get the password.- Returns:
- The password.
-
setPassword
public void setPassword(java.lang.String password)
Set the password.- Parameters:
password- The password.
-
getSender
public java.lang.String getSender()
Get the sender.- Returns:
- The sender.
-
setSender
public void setSender(java.lang.String sender)
Set the sender.- Parameters:
sender- The sender.
-
isSsl
public boolean isSsl()
Is ssl connection?- Returns:
- The
-
setSsl
public void setSsl(boolean ssl)
Set the ssl connection property.- Parameters:
ssl- Flag indicating ssl.
-
isStartTls
public boolean isStartTls()
Get the starttls.- Returns:
- The starttls.
-
setStartTls
public void setStartTls(boolean starttls)
Set the starttls.- Parameters:
starttls- The starttls to set.
-
getReceiveHost
public java.lang.String getReceiveHost()
Get the receivehost.- Returns:
- The receivehost.
-
setReceiveHost
public void setReceiveHost(java.lang.String receivehost)
Set the receivehost.- Parameters:
receivehost- The receivehost to set.
-
getReceiveProtocol
public java.lang.String getReceiveProtocol()
Get the receiveprotocol.- Returns:
- The receiveprotocol.
-
setReceiveProtocol
public void setReceiveProtocol(java.lang.String receiveprotocol)
Set the receiveprotocol.- Parameters:
receiveprotocol- The receiveprotocol to set.
-
isNoAuthentication
public boolean isNoAuthentication()
Get the noAuthentication.- Returns:
- The noAuthentication
-
setNoAuthentication
public void setNoAuthentication(boolean noauth)
Set the noAuthentication.- Parameters:
noAuthentication- The noAuthentication to set
-
writeAccount
public void writeAccount(java.lang.String filename)
Store data to a property file.
-
readAccount
public void readAccount(java.lang.String filename)
Read account data from property file.
-
createAccount
public static EmailAccount createAccount(java.lang.String filename, java.lang.ClassLoader cl)
Read account data from property file.
-
readAccount
public void readAccount(java.io.InputStream is)
Read account data from property file.
-
-