Class MailSendException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.codename1.backend.mail.MailException
com.codename1.backend.mail.MailSendException
- Direct Known Subclasses:
MailAuthenticationException
A mail the server refused, with the reply it gave.
-
Constructor Summary
ConstructorsConstructorDescriptionMailSendException(String message, int code, boolean permanent) code: the three-digit SMTP reply code, an HTTP status from a provider's API, or 0 when there was none
-
Method Summary
Modifier and TypeMethodDescriptionintgetCode()The server's reply code, or 0.booleanWhether sending the same mail again can never succeed: the server answered with a permanent refusal.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MailSendException
code: the three-digit SMTP reply code, an HTTP status from a provider's API, or 0 when there was nonepermanent: whether the server will give the same answer next time. The transport decides: an SMTP 4xx means "later" and an HTTP 4xx mostly means "never", so the number alone does not say.
-
-
Method Details
-
getCode
public int getCode()The server's reply code, or 0. -
isPermanent
public boolean isPermanent()Description copied from class:MailExceptionWhether sending the same mail again can never succeed: the server answered with a permanent refusal. A failure that is not permanent -- a timeout, a dropped connection, a "try again later" -- is retried.- Overrides:
isPermanentin classMailException
-