Interface MailClientBuilder
public interface MailClientBuilder
A builder for
MailClient.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build and return the client.Set a shared client pool name.with(MailConfig configuration) Set a configuration object.withCredentialsSupplier(Supplier<Future<UsernamePasswordCredentials>> credentialsSupplier) Set a credentials supplier for the mail client.
-
Method Details
-
with
Set a configuration object.- Parameters:
configuration- to be used for sending mails- Returns:
- a reference to this, so the API can be used fluently
-
withCredentialsSupplier
MailClientBuilder withCredentialsSupplier(Supplier<Future<UsernamePasswordCredentials>> credentialsSupplier) Set a credentials supplier for the mail client.By default, the credentials are fixed at creation time with
MailConfig.setUsername(String)andMailConfig.setPassword(String).- Returns:
- a reference to this, so the API can be used fluently
-
build
-