Package org.opencms.mail
Class CmsMailHost
java.lang.Object
org.opencms.mail.CmsMailHost
- All Implemented Interfaces:
Comparable<CmsMailHost>
Contains the configuration of an individual mail host.
- Since:
- 6.0.0
-
Constructor Summary
ConstructorDescriptionCmsMailHost
(String hostname, Integer port, Integer order, String protocol, String security, String username, String password) Creates a new mail host.CmsMailHost
(String hostname, Integer port, Integer order, String protocol, String security, String username, String password, String id, String mailfrom) Creates a new mail host. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(CmsMailHost obj) boolean
Returns the host name.getId()
Returns the id of this mail host.Returns the mail from address of this host.getOrder()
Returns the order of this mail host.Returns the password used for authentication.int
getPort()
Returns the port.Returns the protocol used for mail sending, default is "smtp".Gets the value of the security setting.Returns the user name used for authentication.int
hashCode()
boolean
Returnstrue
only if authentication is enabled, the default isfalse
.toString()
-
Constructor Details
-
CmsMailHost
public CmsMailHost(String hostname, Integer port, Integer order, String protocol, String security, String username, String password) Creates a new mail host.- Parameters:
hostname
- the name of the mail hostport
- the port, if < 0 then 25 is usedorder
- 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 authentication
-
CmsMailHost
public CmsMailHost(String hostname, Integer port, Integer order, String protocol, String security, String username, String password, String id, String mailfrom) Creates a new mail host.- Parameters:
hostname
- the name of the mail hostport
- the port, if < 0 then 25 is usedorder
- 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 authenticationid
- the id of the mail hostmailfrom
- the mail-from address of the mail host
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CmsMailHost>
- See Also:
-
equals
-
getHostname
Returns the host name.- Returns:
- the host name
-
getId
Returns the id of this mail host.- Returns:
- the id of this mail host
-
getMailfrom
Returns the mail from address of this host.- Returns:
- the mail from address of this host
-
getOrder
Returns the order of this mail host.- Returns:
- the order of this mail host
-
getPassword
Returns the password used for authentication.- Returns:
- the password used for authentication
-
getPort
Returns the port.- Returns:
- the port
-
getProtocol
Returns the protocol used for mail sending, default is "smtp".- Returns:
- the protocol used for mail sending
-
getSecurity
Gets the value of the security setting.- Returns:
- the value of the security setting
-
getUsername
Returns the user name used for authentication.- Returns:
- the user name used for authentication
-
hashCode
-
isAuthenticating
Returnstrue
only if authentication is enabled, the default isfalse
.Authentication is enabled only if both "username" and "password" are not
null
.- Returns:
true
only if authentication is enabled
-
toString
-