Interface MailClient

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 Type
    Method
    Description
    static @NotNull MailClient
    create(@NotNull MailConfig mailConfig)
    Creates a new MailClient instance with the given mail configuration.
    static @NotNull MailClient
    create(@NotNull MailConfig mailConfig, @NotNull String username, @NotNull String password)
    Creates a new MailClient instance with the given mail configuration, username, and password.
    @NotNull MailMessage
    Creates a new mail message.
  • Method Details

    • create

      @NotNull static @NotNull MailClient create(@NotNull @NotNull MailConfig mailConfig)
      Creates a new MailClient instance with the given mail configuration.
      Parameters:
      mailConfig - the MailConfig object containing the mail configuration
      Returns:
      a new MailClient instance
    • create

      @NotNull static @NotNull MailClient create(@NotNull @NotNull MailConfig mailConfig, @NotNull @NotNull String username, @NotNull @NotNull String password)
      Creates a new MailClient instance with the given mail configuration, username, and password.
      Parameters:
      mailConfig - the MailConfig object containing the mail configuration
      username - the username for authentication
      password - the password for authentication
      Returns:
      a new MailClient instance
    • createMessage

      @NotNull @NotNull MailMessage createMessage()
      Creates a new mail message.
      Returns:
      a new MailMessage instance