public class SmtpSslServer extends SmtpServer
MailServer.Builder| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
DEFAULT_SSL_PORT |
protected boolean |
startSsl |
protected boolean |
startTlsRequired
是否开启tls; tls是ssl的继承者,是同一协议的不同版本; starttls指把纯文本转换为tls的加密
|
DEFAULT_SMTP_PORT, PROTOCOL_SMTPauthenticator, customProperties, debugMode, host, MAIL_DEBUG, MAIL_HOST, MAIL_MIME_SPLITLONGPARAMETERS, MAIL_SMTP_AUTH, MAIL_SMTP_CONNECTIONTIMEOUT, MAIL_SMTP_HOST, MAIL_SMTP_PORT, MAIL_SMTP_SOCKET_FACTORY_CLASS, MAIL_SMTP_SOCKET_FACTORY_FALLBACK, MAIL_SMTP_SOCKET_FACTORY_PORT, MAIL_SMTP_STARTTLS_ENABLE, MAIL_SMTP_STARTTLS_REQUIRED, MAIL_SMTP_TIMEOUT, MAIL_SMTP_WRITETIMEOUT, MAIL_TRANSPORT_PROTOCOL, port, timeout| 构造器和说明 |
|---|
SmtpSslServer(MailServer.Builder builder) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.util.Properties |
createSessionProperties() |
SmtpSslServer |
startSsl(boolean startSsl) |
SmtpSslServer |
startTlsRequired(boolean startTlsRequired)
Sets
mail.smtp.starttls.required. |
createSession, getTransportcreate, initSystemProperties, toStringprotected static final int DEFAULT_SSL_PORT
protected boolean startTlsRequired
protected boolean startSsl
public SmtpSslServer(MailServer.Builder builder)
public SmtpSslServer startTlsRequired(boolean startTlsRequired)
mail.smtp.starttls.required.
If the server doesn't support the STARTTLS command, or the command fails,
the connect method will fail. Defaults to false.
startTlsRequired - If true, requires the use of the STARTTLS command.public SmtpSslServer startSsl(boolean startSsl)
protected java.util.Properties createSessionProperties()
createSessionProperties 在类中 SmtpServer