public class MailerBuilder extends Object
MailerGenericBuilder
and fully configure a Mailer.
Any of these methods return a specialized builder, of which there are two:
Session
instanceSession
instanceMailerFromSessionBuilderImpl
,
MailerRegularBuilderImpl
Modifier and Type | Method and Description |
---|---|
static org.simplejavamail.api.mailer.Mailer |
buildMailer()
Shortcuts to
MailerRegularBuilder.buildMailer() . |
static org.simplejavamail.mailer.internal.MailerFromSessionBuilderImpl |
usingSession(@NotNull javax.mail.Session session)
Delegates to
MailerFromSessionBuilderImpl.usingSession(Session) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withDebugLogging(Boolean debugLogging)
Delegates to
MailerGenericBuilder.withDebugLogging(Boolean) |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServer(@Nullable String host,
@Nullable Integer port)
Delegates to
MailerRegularBuilder.withSMTPServer(String, Integer) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServer(@Nullable String host,
@Nullable Integer port,
@Nullable String username)
Delegates to
MailerRegularBuilder.withSMTPServer(String, Integer, String) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServer(@Nullable String host,
@Nullable Integer port,
@Nullable String username,
@Nullable String password)
Delegates to
MailerRegularBuilder.withSMTPServer(String, Integer, String, String) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServerHost(@Nullable String host)
Delegates to
MailerRegularBuilder.withSMTPServerHost(String) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServerPassword(@Nullable String password)
Delegates to
MailerRegularBuilder.withSMTPServerPassword(String) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServerPort(@Nullable Integer port)
Delegates to
MailerRegularBuilder.withSMTPServerPort(Integer) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServerUsername(@Nullable String username)
Delegates to
MailerRegularBuilder.withSMTPServerUsername(String) . |
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withTransportStrategy(@NotNull org.simplejavamail.api.mailer.config.TransportStrategy transportStrategy)
Delegates to
MailerRegularBuilder.withTransportStrategy(TransportStrategy) . |
public static org.simplejavamail.mailer.internal.MailerFromSessionBuilderImpl usingSession(@NotNull @NotNull javax.mail.Session session)
MailerFromSessionBuilderImpl.usingSession(Session)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withTransportStrategy(@NotNull @NotNull org.simplejavamail.api.mailer.config.TransportStrategy transportStrategy)
MailerRegularBuilder.withTransportStrategy(TransportStrategy)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServer(@Nullable @Nullable String host, @Nullable @Nullable Integer port, @Nullable @Nullable String username, @Nullable @Nullable String password)
MailerRegularBuilder.withSMTPServer(String, Integer, String, String)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServer(@Nullable @Nullable String host, @Nullable @Nullable Integer port, @Nullable @Nullable String username)
MailerRegularBuilder.withSMTPServer(String, Integer, String)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServer(@Nullable @Nullable String host, @Nullable @Nullable Integer port)
MailerRegularBuilder.withSMTPServer(String, Integer)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServerHost(@Nullable @Nullable String host)
MailerRegularBuilder.withSMTPServerHost(String)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServerPort(@Nullable @Nullable Integer port)
MailerRegularBuilder.withSMTPServerPort(Integer)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServerUsername(@Nullable @Nullable String username)
MailerRegularBuilder.withSMTPServerUsername(String)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServerPassword(@Nullable @Nullable String password)
MailerRegularBuilder.withSMTPServerPassword(String)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withDebugLogging(Boolean debugLogging)
MailerGenericBuilder.withDebugLogging(Boolean)
Note: Assumes you don't want to use your own Session
object (otherwise start with usingSession(Session)
instead).
public static org.simplejavamail.api.mailer.Mailer buildMailer()
MailerRegularBuilder.buildMailer()
. This means that none of the builder methods are used and the configuration completely
depends on defaults being configured from property file ("simplejavamail.properties") on the classpath or through programmatic defaults.Copyright © 2009–2021. All rights reserved.