com.lavantech.net.mail
Class MailException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.lavantech.net.mail.MailException
All Implemented Interfaces:
java.io.Serializable

public class MailException
extends java.lang.Exception

This execption is thrown if mailing failed for certail email address. This exception can be thrown even if the mail was successfully sent to other email address in the Message. This exception has the list of failed Email Address and the reason for the failure.

See Also:
Serialized Form

Constructor Summary
MailException(EmailAddress[] failedAddresses, java.lang.String[] reasons)
          Constructs the Exception with a list of Failed Email Address and Reasons.
 
Method Summary
 EmailAddress[] getFailedAddresses()
          Returns an array of EmailAddress for which the mailing failed.
 java.lang.String getMessage()
          Returns a message that has a list of failed email address and reason for failure.
 java.lang.String[] getReasons()
          Returns an array of reasons for failure.
 java.lang.String toString()
          Converts the exception to a string format.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailException

public MailException(EmailAddress[] failedAddresses,
                     java.lang.String[] reasons)
Constructs the Exception with a list of Failed Email Address and Reasons.

Parameters:
failedAddresses - An array of Email Address for which the mailing failed.
reasons - An array of reason for failure for each corresponding email address in failedAddresses.
Method Detail

getFailedAddresses

public EmailAddress[] getFailedAddresses()
Returns an array of EmailAddress for which the mailing failed.


getReasons

public java.lang.String[] getReasons()
Returns an array of reasons for failure. There ia reason for each failed EmailAddress.


getMessage

public java.lang.String getMessage()
Returns a message that has a list of failed email address and reason for failure.


toString

public java.lang.String toString()
Converts the exception to a string format.