Top Description Fields Constructors Methods
javax.mail

public Class SendFailedException

extends MessagingException
Class Inheritance

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.

Authors
John Mani, Max Spivak
See Also
javax.mail.Transport#send, javax.mail.Transport#sendMessage, javax.mail.event.TransportEvent

Field Summary

Modifier and TypeField and Description
protected transient Address[]
private static final long
protected transient Address[]
protected transient Address[]

Constructor Summary

AccessConstructor and Description
public
SendFailedException()

Constructs a SendFailedException with no detail message.

public
SendFailedException(String
the detail message
s
)

Constructs a SendFailedException with the specified detail message.

public
SendFailedException(String
the detail message
s
,
Exception
the embedded exception
e
)

Constructs a SendFailedException with the specified Exception and detail message.

public
SendFailedException(String
the detail message
msg
,
Exception
the embedded exception
ex
,
Address[]
valid addresses to which message was sent
validSent
,
Address[]
valid addresses to which message was not sent
validUnsent
,
Address[]
the invalid addresses
invalid
)

Constructs a SendFailedException with the specified string and the specified address objects.

Method Summary

Modifier and TypeMethod and Description
public Address[]

Returns:

Addresses to which the message sending failed or null;
getInvalidAddresses
()

Return the addresses to which this message could not be sent.

public Address[]

Returns:

Addresses to which the message was sent successfully or null
getValidSentAddresses
()

Return the addresses to which this message was sent succesfully.

public Address[]

Returns:

Addresses that are valid but to which the message was not sent successfully or null
getValidUnsentAddresses
()

Return the addresses that are valid but to which this message was not sent.

Inherited from javax.mail.MessagingException:
getCausegetNextExceptionsetNextExceptiontoString

Field Detail

invalidback to summary
protected transient Address[] invalid
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.mail.MessagingException.serialVersionUID.

validSentback to summary
protected transient Address[] validSent
validUnsentback to summary
protected transient Address[] validUnsent

Constructor Detail

SendFailedExceptionback to summary
public SendFailedException()

Constructs a SendFailedException with no detail message.

SendFailedExceptionback to summary
public SendFailedException(String s)

Constructs a SendFailedException with the specified detail message.

Parameters
s:String

the detail message

SendFailedExceptionback to summary
public SendFailedException(String s, Exception e)

Constructs a SendFailedException with the specified Exception and detail message. The specified exception is chained to this exception.

Parameters
s:String

the detail message

e:Exception

the embedded exception

See Also
getNextException, setNextException
SendFailedExceptionback to summary
public SendFailedException(String msg, Exception ex, Address[] validSent, Address[] validUnsent, Address[] invalid)

Constructs a SendFailedException with the specified string and the specified address objects.

Parameters
msg:String

the detail message

ex:Exception

the embedded exception

validSent:Address[]

valid addresses to which message was sent

validUnsent:Address[]

valid addresses to which message was not sent

invalid:Address[]

the invalid addresses

See Also
getNextException, setNextException

Method Detail

getInvalidAddressesback to summary
public Address[] getInvalidAddresses()

Return the addresses to which this message could not be sent.

Returns:Address[]

Addresses to which the message sending failed or null;

getValidSentAddressesback to summary
public Address[] getValidSentAddresses()

Return the addresses to which this message was sent succesfully.

Returns:Address[]

Addresses to which the message was sent successfully or null

getValidUnsentAddressesback to summary
public Address[] getValidUnsentAddresses()

Return the addresses that are valid but to which this message was not sent.

Returns:Address[]

Addresses that are valid but to which the message was not sent successfully or null