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 Mailer |
buildMailer()
Shortcuts to
MailerRegularBuilder.buildMailer() . |
static org.simplejavamail.mailer.internal.MailerFromSessionBuilderImpl |
usingSession(@NotNull jakarta.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)
|
static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl |
withSMTPServer(@Nullable String host,
@Nullable Integer port,
@Nullable String username,
@Nullable String password)
|
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 TransportStrategy transportStrategy)
|
public static org.simplejavamail.mailer.internal.MailerFromSessionBuilderImpl usingSession(@NotNull @NotNull jakarta.mail.Session session)
MailerFromSessionBuilderImpl.usingSession(Session)
.public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withTransportStrategy(@NotNull @NotNull TransportStrategy 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)
public static org.simplejavamail.mailer.internal.MailerRegularBuilderImpl withSMTPServer(@Nullable @Nullable String host, @Nullable @Nullable Integer port, @Nullable @Nullable String username)
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 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–2022. All rights reserved.