Package javax.mail
Class SendFailedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- javax.mail.MessagingException
-
- javax.mail.SendFailedException
-
- All Implemented Interfaces:
java.io.Serializable
public class SendFailedException extends MessagingException
An exception thrown when a message cannot be sent.It 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.
- Version:
- 1.4
- Author:
- Chris Burdess
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SendFailedException()
SendFailedException(java.lang.String message)
SendFailedException(java.lang.String message, java.lang.Exception exception)
SendFailedException(java.lang.String message, java.lang.Exception exception, Address[] validSent, Address[] validUnsent, Address[] invalid)
Creates a send failed exception with the specified string and addresses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Address[]
getInvalidAddresses()
Returns the addresses to which this message could not be sent.Address[]
getValidSentAddresses()
Returns the addresses to which this message was sent succesfully.Address[]
getValidUnsentAddresses()
Returns 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
-
-
-
-
Constructor Detail
-
SendFailedException
public SendFailedException()
-
SendFailedException
public SendFailedException(java.lang.String message)
-
SendFailedException
public SendFailedException(java.lang.String message, java.lang.Exception exception)
-
SendFailedException
public SendFailedException(java.lang.String message, java.lang.Exception exception, Address[] validSent, Address[] validUnsent, Address[] invalid)
Creates a send failed exception with the specified string and addresses.- Parameters:
message
- the detail messageexception
- the embedded exceptionvalidSent
- valid addresses to which message was sentvalidUnsent
- valid addresses to which message was not sentinvalid
- the invalid addresses
-
-
Method Detail
-
getValidSentAddresses
public Address[] getValidSentAddresses()
Returns the addresses to which this message was sent succesfully.
-
getValidUnsentAddresses
public Address[] getValidUnsentAddresses()
Returns the addresses that are valid but to which this message was not sent.
-
getInvalidAddresses
public Address[] getInvalidAddresses()
Returns the addresses to which this message could not be sent.
-
-