public class

SendFailedException

extends MessagingException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ com.google.code.javax.mail.MessagingException
         ↳ com.google.code.javax.mail.SendFailedException
Known Direct Subclasses

Class Overview

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.

See Also
  • javax.mail.Transport#send
  • javax.mail.Transport#sendMessage
  • javax.mail.event.TransportEvent

Summary

Constants
long serialVersionUID
[Expand]
Inherited Constants
From class com.google.code.javax.mail.MessagingException
From class java.lang.Exception
From class java.lang.Throwable
Fields
protected Address[] invalid
protected Address[] validSent
protected Address[] validUnsent
[Expand]
Inherited Fields
From class com.google.code.javax.mail.MessagingException
From class java.lang.Throwable
Public Constructors
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.
Public Methods
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.
[Expand]
Inherited Methods
From class com.google.code.javax.mail.MessagingException
From class java.lang.Throwable
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: -6457531621682372913 (0xa6623d341bc51ecf)

Fields

protected Address[] invalid

protected Address[] validSent

protected Address[] validUnsent

Public Constructors

public SendFailedException ()

Constructs a SendFailedException with no detail message.

public SendFailedException (String s)

Constructs a SendFailedException with the specified detail message.

Parameters
s The detail message

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 The detail message
e The embedded exception

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 The detail message
ex The embedded exception
validSent Valid addresses to which message was sent
validUnsent Valid addresses to which message was not sent
invalid The invalid addresses

Public Methods

public Address[] getInvalidAddresses ()

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

Returns
  • Addresses to which the message sending failed or null;

public Address[] getValidSentAddresses ()

Return the addresses to which this message was sent succesfully.

Returns
  • Addresses to which the message was sent successfully or null

public Address[] getValidUnsentAddresses ()

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

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