Class EmailResult

    • Constructor Detail

      • EmailResult

        @Deprecated
        public EmailResult​(SerialisedEmail email)
        Deprecated.
        Use EmailResult(Email) instead.
        Create an EmailResult for a successful sent e-mail message.
        Parameters:
        email - The e-mail message that was successfully sent. This can be null to indicate an asynchronous retry to send the mail.
      • EmailResult

        public EmailResult​(Email email)
        Creates an EmailResult for a successfully sent e-mail message.
        Parameters:
        email - The e-mail message that was successfully sent. This can be null to indicate an asynchronous retry to send the mail.
      • EmailResult

        public EmailResult​(Throwable throwable,
                           Boolean retryPossible)
        Create an EmailResult for an e-mail message where problems occurred while sending.
        Parameters:
        throwable - The reason, why sending the e-mail message failed.
        retryPossible - Whether a later retry would make sense. null will be interpreted as false.
      • EmailResult

        @Deprecated
        public EmailResult​(SerialisedEmail email,
                           Throwable throwable,
                           Boolean retryPossible)
        Parameters:
        email - The e-mail message that was sent or null if any problem occurred.
        throwable - The reason, why sending the e-mail message failed or null if no problems occurred.
        retryPossible - Whether a later retry would make sense. null will be interpreted as false.
      • EmailResult

        public EmailResult​(Email email,
                           Throwable throwable,
                           Boolean retryPossible)
        Parameters:
        email - The e-mail message that has been sent or null if a problem occurred.
        throwable - The reason, why sending the e-mail message failed or null if no problems occurred.
        retryPossible - Whether a later retry would make sense. null will be interpreted as false.
    • Method Detail

      • successful

        public boolean successful()
        Returns:
        Whether sending the e-mail was successful.
      • asynchronousRetry

        public boolean asynchronousRetry()
        Returns:
        Whether an asynchronous retry is pending. In this case neither the e-mail nor the exception will be set.
      • getMail

        public Email getMail()
        Returns:
        The e-mail message that was sent. If a problem occurred, null will be returned.
      • getEmail

        @Deprecated
        public SerialisedEmail getEmail()
        Deprecated.
        Use getMail() instead.
        Returns:
        The e-mail message that was sent. If a problem occurred, null will be returned.
      • getThrowable

        public Throwable getThrowable()
        Returns:
        The reason, why sending the e-mail message failed. If no problems occurred, null will be returned.
      • isRetryPossible

        public boolean isRetryPossible()
        Returns:
        Whether a later retry would make sense.