javax.mail
类 SendFailedException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 javax.mail.MessagingException
              继承者 javax.mail.SendFailedException
所有已实现的接口:
Serializable
直接已知子类:
SMTPAddressFailedException, SMTPSendFailedException

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.

作者:
John Mani, Max Spivak
另请参见:
Transport.send(javax.mail.Message), Transport.sendMessage(javax.mail.Message, javax.mail.Address[]), TransportEvent, 序列化表格

字段摘要
protected  Address[] invalid
           
protected  Address[] validSent
           
protected  Address[] validUnsent
           
 
构造方法摘要
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.
 
方法摘要
 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.
 
从类 javax.mail.MessagingException 继承的方法
getCause, getNextException, setNextException, toString
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

invalid

protected transient Address[] invalid

validSent

protected transient Address[] validSent

validUnsent

protected transient Address[] validUnsent
构造方法详细信息

SendFailedException

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


SendFailedException

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

参数:
s - the detail message

SendFailedException

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

参数:
s - the detail message
e - the embedded exception
另请参见:
MessagingException.getNextException(), MessagingException.setNextException(java.lang.Exception)

SendFailedException

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

参数:
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
另请参见:
MessagingException.getNextException(), MessagingException.setNextException(java.lang.Exception)
方法详细信息

getValidSentAddresses

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

返回:
Addresses to which the message was sent successfully or null

getValidUnsentAddresses

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

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

getInvalidAddresses

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

返回:
Addresses to which the message sending failed or null;


Copyright © 2013. All Rights Reserved.