- All Known Implementing Classes:
MailClientImpl
public interface MailClient
The MailClient interface provides methods for creating and managing mail clients.
It includes static methods to create instances of MailClient and a method to create mail messages.
- Author:
- Besmir Beqiri
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull MailClientcreate(@NotNull MailConfig mailConfig) Creates a new MailClient instance with the given mail configuration.static @NotNull MailClientcreate(@NotNull MailConfig mailConfig, @NotNull String username, @NotNull String password) Creates a newMailClientinstance with the given mail configuration, username, and password.@NotNull MailMessageCreates a new mail message.
-
Method Details
-
create
Creates a new MailClient instance with the given mail configuration.- Parameters:
mailConfig- theMailConfigobject containing the mail configuration- Returns:
- a new
MailClientinstance
-
create
@NotNull static @NotNull MailClient create(@NotNull @NotNull MailConfig mailConfig, @NotNull @NotNull String username, @NotNull @NotNull String password) Creates a newMailClientinstance with the given mail configuration, username, and password.- Parameters:
mailConfig- theMailConfigobject containing the mail configurationusername- the username for authenticationpassword- the password for authentication- Returns:
- a new
MailClientinstance
-
createMessage
Creates a new mail message.- Returns:
- a new
MailMessageinstance
-