public class CmsMailSettings
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
MAIL_DEFAULT_PROTOCOL
The default protocol for sending mail ("smtp").
|
static java.lang.String |
MAIL_DEFAULT_SENDER
The default mail from address.
|
| 构造器和说明 |
|---|
CmsMailSettings()
Empty constructor, required for configuration.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addMailHost(java.lang.String hostname,
java.lang.String order,
java.lang.String protocol,
java.lang.String username,
java.lang.String password)
Adds a new mail host to the internal list of mail hosts with default port 25.
|
void |
addMailHost(java.lang.String hostname,
java.lang.String port,
java.lang.String order,
java.lang.String protocol,
java.lang.String username,
java.lang.String password)
Adds a new mail host to the internal list of mail hosts.
|
CmsMailHost |
getDefaultMailHost()
Returns the default mail host.
|
java.lang.String |
getMailFromDefault()
Returns the mail from default sender.
|
java.util.List<CmsMailHost> |
getMailHosts()
Returns an unmodifiable sorted list of all configured mail hosts.
|
void |
setMailFromDefault(java.lang.String sender)
Sets the mail from default sender.
|
java.lang.String |
toString() |
public static final java.lang.String MAIL_DEFAULT_PROTOCOL
public static final java.lang.String MAIL_DEFAULT_SENDER
public void addMailHost(java.lang.String hostname,
java.lang.String order,
java.lang.String protocol,
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")username - the user name to use for authenticationpassword - the password to use for authenticationpublic void addMailHost(java.lang.String hostname,
java.lang.String port,
java.lang.String order,
java.lang.String protocol,
java.lang.String username,
java.lang.String password)
hostname - the name of the mail hostport - the port of the mail hostorder - the order in which the host is triedprotocol - the protocol to use (default "smtp")username - the user name to use for authenticationpassword - the password to use for authenticationpublic CmsMailHost getDefaultMailHost()
public java.lang.String getMailFromDefault()
public java.util.List<CmsMailHost> getMailHosts()
public void setMailFromDefault(java.lang.String sender)
sender - the mail from default sender to setpublic java.lang.String toString()
toString 在类中 java.lang.ObjectObject.toString()