Class SMTPException

All Implemented Interfaces:
Serializable

public class SMTPException extends VertxException
This represents an Exception during communication with SMTP server.
Author:
Lin Gao
See Also:
  • Constructor Details

    • SMTPException

      public SMTPException(String message, int replyCode, List<String> replyMessages, boolean supportEnhancementStatusCode)
      Constructor of SMTPException.
      Parameters:
      message - the informative message prepending the reply messages
      replyCode - the SMTP reply code
      replyMessages - the SMTP reply messages
      supportEnhancementStatusCode - if ENHANCEDSTATUSCODES is supported or not
  • Method Details

    • getReplyCode

      public int getReplyCode()
      Gets the SMTP reply status code.
      Returns:
      the SMTP reply status code.
    • getReplyMessages

      public List<String> getReplyMessages()
      Gets the SMTP reply messages. It maybe multi lines messages splits by \n
      Returns:
      the SMTP reply messages
    • getReplyMessage

      public String getReplyMessage()
      Gets the SMTP reply message. In case of multi lines messages, returns the first line.
      Returns:
      the SMTP reply message
    • isPermanent

      public boolean isPermanent()
      Checks if it is a permanent failure, that the reply status code >= 500
      Returns:
      true if it is a permanent failure, false otherwise.
    • isTransient

      public boolean isTransient()
      Checks if it is a transient failure, that the reply status code >= 400 and < 500
      Returns:
      true if it is a transient failure, false otherwise.
    • getEnhancedStatus

      public SMTPException.EnhancedStatus getEnhancedStatus()
      EnhancedStatus of the exception.
      Returns:
      the EnhancedStatus.