public class SendFailedException extends MessagingException
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.
Transport.send(javax.mail.Message)
,
Transport.sendMessage(javax.mail.Message, javax.mail.Address[])
,
TransportEvent
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Address[] |
invalid |
protected Address[] |
validSent |
protected Address[] |
validUnsent |
Constructor and Description |
---|
SendFailedException()
Constructs a SendFailedException with no detail message.
|
SendFailedException(String s)
Constructs a SendFailedException with the specified detail message.
|
SendFailedException(String s,
Exception e)
Constructs a SendFailedException with the specified
Exception and detail message.
|
SendFailedException(String msg,
Exception ex,
Address[] validSent,
Address[] validUnsent,
Address[] invalid)
Constructs a SendFailedException with the specified string
and the specified address objects.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getCause, getNextException, setNextException, toString
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
protected transient Address[] invalid
protected transient Address[] validSent
protected transient Address[] validUnsent
public SendFailedException()
public SendFailedException(String s)
s
- the detail messagepublic SendFailedException(String s, Exception e)
s
- the detail messagee
- the embedded exceptionMessagingException.getNextException()
,
MessagingException.setNextException(java.lang.Exception)
public SendFailedException(String msg, Exception ex, Address[] validSent, Address[] validUnsent, Address[] invalid)
msg
- the detail messageex
- the embedded exceptionvalidSent
- valid addresses to which message was sentvalidUnsent
- valid addresses to which message was not sentinvalid
- the invalid addressesMessagingException.getNextException()
,
MessagingException.setNextException(java.lang.Exception)
public Address[] getValidSentAddresses()
public Address[] getValidUnsentAddresses()
public Address[] getInvalidAddresses()
Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.