public class CmsMailHost extends java.lang.Object implements java.lang.Comparable<CmsMailHost>
Constructor and Description |
---|
CmsMailHost(java.lang.String hostname,
java.lang.Integer port,
java.lang.Integer order,
java.lang.String protocol,
java.lang.String security,
java.lang.String username,
java.lang.String password)
Creates a new mail host.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CmsMailHost obj) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHostname()
Returns the host name.
|
java.lang.Integer |
getOrder()
Returns the order of this mail host.
|
java.lang.String |
getPassword()
Returns the password used for authentication.
|
int |
getPort()
Returns the port.
|
java.lang.String |
getProtocol()
Returns the protocol used for mail sending, default is "smtp".
|
java.lang.String |
getSecurity()
Gets the value of the security setting.
|
java.lang.String |
getUsername()
Returns the user name used for authentication.
|
int |
hashCode() |
boolean |
isAuthenticating()
Returns
true only if authentication is enabled,
the default is false . |
java.lang.String |
toString() |
public CmsMailHost(java.lang.String hostname, java.lang.Integer port, java.lang.Integer order, java.lang.String protocol, java.lang.String security, java.lang.String username, java.lang.String password)
hostname
- the name of the mail hostorder
- the order in which the host is triedprotocol
- the protocol to use (default "smtp")security
- the security settingusername
- the user name to use for authenticationpassword
- the password to use for authenticationport
- the port, if < 0 then 25 is usedpublic int compareTo(CmsMailHost obj)
compareTo
in interface java.lang.Comparable<CmsMailHost>
Comparable.compareTo(java.lang.Object)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String getHostname()
public java.lang.Integer getOrder()
public java.lang.String getPassword()
public int getPort()
public java.lang.String getProtocol()
public java.lang.String getSecurity()
public java.lang.String getUsername()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isAuthenticating()
true
only if authentication is enabled,
the default is false
.
Authentication is enabled only if both "username" and "password"
are not null
.
true
only if authentication is enabledpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()