org.appng.mail

## Interface MailTransport

- All Known Implementing Classes:
    DefaultTransport

      public interface MailTransport

  SPI for sending e-mails.
  Author:
    Matthias Müller

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Mail` | `createMail()` Creates and returns a new `Mail`.
    `String` | `getMailAsString(Mail mail)` Returns a string-representation if the given `Mail`. Attention: The `Mail` may contain sensitive informations like passwords!
    `boolean` | `isDisableSend()` Checks whether this `MailTransport` is disabled.
    `void` | `send(Mail mail)` Send the given `Mail`.
    `void` | `setDisableSend(boolean disableSend)` Enable/disable sending for this `MailTransport`.

- - ### Method Detail

    - #### createMail

          Mail createMail()

      Creates and returns a new `Mail`.
      Returns:
        the new `Mail`

    - #### send

          void send(Mail mail)
             throws MailException

      Send the given `Mail`.
      Parameters:
        `mail` - the `Mail` to send
      Throws:
        `MailException` - if an error occurs while sending the `Mail`

    - #### getMailAsString

          String getMailAsString(Mail mail)

      Returns a string-representation if the given `Mail`.
      Attention: The `Mail` may contain sensitive informations like passwords!
      Parameters:
        `mail` - the `Mail` to get the string-representation for
      Returns:
        a `String` representation the `Mail`

    - #### isDisableSend

          boolean isDisableSend()

      Checks whether this `MailTransport` is disabled.
      Returns:
        `true` if this `MailTransport` is disabled, `false` otherwise.

    - #### setDisableSend

          void setDisableSend(boolean disableSend)

      Enable/disable sending for this `MailTransport`. If set to `true`, `Mail`s will be logged instead of being send.
      Parameters:
        `disableSend` -

Copyright © 2011–2023 aiticon GmbH. All rights reserved.