SmtpException

Inheritance: java.lang.Object, java.lang.Throwable, java.lang.Exception, java.lang.RuntimeException, com.aspose.ms.System.Exception, com.aspose.email.AsposeException

public class SmtpException extends AsposeException

Represents the exception that is thrown when the SmtpClient is not able to complete an operation.

Constructors

Constructor Description
SmtpException(int statusCode) Initializes a new instance of the SmtpException class
SmtpException(int statusCode, String message) Initializes a new instance of the SmtpException class
SmtpException() Initializes a new instance of the SmtpException class
SmtpException(String message) Initializes a new instance of the SmtpException class
SmtpException(String message, SendMessagesResult result) Initializes a new instance of the SmtpException class
SmtpException(String message, Throwable innerException) Initializes a new instance of the SmtpException class
SmtpException(String message, Throwable innerException, MailMessage mailMessage) Initializes a new instance of the SmtpException class
SmtpException(String message, MailMessage mailMessage) Initializes a new instance of the SmtpException class

Methods

Method Description
getStatusCode() Smtp status code
setStatusCode(int value) Smtp status code
getOperationDetails() Gets extra information aboout error

SmtpException(int statusCode)

public SmtpException(int statusCode)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
statusCode int Smtp status code

SmtpException(int statusCode, String message)

public SmtpException(int statusCode, String message)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
statusCode int Smtp status code
message java.lang.String Error message

SmtpException()

public SmtpException()

Initializes a new instance of the SmtpException class

SmtpException(String message)

public SmtpException(String message)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
message java.lang.String Error message

SmtpException(String message, SendMessagesResult result)

public SmtpException(String message, SendMessagesResult result)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
message java.lang.String Error message
result SendMessagesResult Operation result

SmtpException(String message, Throwable innerException)

public SmtpException(String message, Throwable innerException)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
message java.lang.String Error message
innerException java.lang.Throwable The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

SmtpException(String message, Throwable innerException, MailMessage mailMessage)

public SmtpException(String message, Throwable innerException, MailMessage mailMessage)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
message java.lang.String Error message
innerException java.lang.Throwable The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
mailMessage MailMessage

SmtpException(String message, MailMessage mailMessage)

public SmtpException(String message, MailMessage mailMessage)

Initializes a new instance of the SmtpException class

Parameters:

Parameter Type Description
message java.lang.String Error message
mailMessage MailMessage

getStatusCode()

public final int getStatusCode()

Smtp status code

Returns: int

setStatusCode(int value)

public final void setStatusCode(int value)

Smtp status code

Parameters:

Parameter Type Description
value int

getOperationDetails()

public final SendMessagesResult getOperationDetails()

Gets extra information aboout error

Returns: SendMessagesResult