Class SMTPException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.vertx.core.VertxException
io.vertx.ext.mail.SMTPException
- All Implemented Interfaces:
Serializable
This represents an Exception during communication with SMTP server.
- Author:
- Lin Gao
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe Enhanced Status codes. -
Constructor Summary
ConstructorsConstructorDescriptionSMTPException(String message, int replyCode, List<String> replyMessages, boolean supportEnhancementStatusCode) Constructor of SMTPException. -
Method Summary
Modifier and TypeMethodDescriptionEnhancedStatus of the exception.intGets the SMTP reply status code.Gets the SMTP reply message.Gets the SMTP reply messages.booleanChecks if it is a permanent failure, that the reply status code>=500booleanChecks if it is a transient failure, that the reply status code>=400 and<500Methods inherited from class VertxException
noStackTrace, noStackTrace, noStackTraceMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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 messagesreplyCode- the SMTP reply codereplyMessages- the SMTP reply messagessupportEnhancementStatusCode- ifENHANCEDSTATUSCODESis supported or not
-
-
Method Details
-
getReplyCode
public int getReplyCode()Gets the SMTP reply status code.- Returns:
- the SMTP reply status code.
-
getReplyMessages
-
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
EnhancedStatus of the exception.- Returns:
- the EnhancedStatus.
-