javax.mail

Class SendFailedException


public class SendFailedException
extends MessagingException

This exception is thrown when the message cannot be sent.

The exception includes those addresses to which the message could not be sent as well as the valid addresses to which the message was sent and valid addresses to which the message was not sent.

Field Summary

protected Address[]
invalid
protected Address[]
validSent
protected Address[]
validUnsent

Constructor Summary

SendFailedException()
Constructs a MessagingException with no detail message.
SendFailedException(String message)
Constructs a MessagingException with the specified detail message.
SendFailedException(String message, Exception exception)
Constructs a MessagingException with the specified Exception and detail message.
SendFailedException(String message, Exception exception, Address[] validSent, Address[] validUnsent, Address[] invalid)
Constructs a SendFailedException with the specified string and the specified address objects.

Method Summary

Address[]
getInvalidAddresses()
Return the addresses to which this message could not be sent.
Address[]
getValidSentAddresses()
Return the addresses to which this message was sent succesfully.
Address[]
getValidUnsentAddresses()
Return the addresses that are valid but to which this message was not sent.

Methods inherited from class javax.mail.MessagingException

getMessage, getNextException, printStackTrace, printStackTrace, setNextException

Field Details

invalid

protected Address[] invalid


validSent

protected Address[] validSent


validUnsent

protected Address[] validUnsent

Constructor Details

SendFailedException

public SendFailedException()
Constructs a MessagingException with no detail message.


SendFailedException

public SendFailedException(String message)
Constructs a MessagingException with the specified detail message.

Parameters:
message - the detail message


SendFailedException

public SendFailedException(String message,
                           Exception exception)
Constructs a MessagingException with the specified Exception and detail message. The specified exception is chained to this exception.

Parameters:
message - the detail message
exception - the embedded exception


SendFailedException

public SendFailedException(String message,
                           Exception exception,
                           Address[] validSent,
                           Address[] validUnsent,
                           Address[] invalid)
Constructs a SendFailedException with the specified string and the specified address objects.

Parameters:
message - the detail message
exception - the embedded exception
validSent - valid addresses to which message was sent
validUnsent - valid addresses to which message was not sent
invalid - the invalid addresses

Method Details

getInvalidAddresses

public Address[] getInvalidAddresses()
Return the addresses to which this message could not be sent.


getValidSentAddresses

public Address[] getValidSentAddresses()
Return the addresses to which this message was sent succesfully.


getValidUnsentAddresses

public Address[] getValidUnsentAddresses()
Return the addresses that are valid but to which this message was not sent.