com.sun.mail.smtp
类 SMTPSendFailedException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 javax.mail.MessagingException
              继承者 javax.mail.SendFailedException
                  继承者 com.sun.mail.smtp.SMTPSendFailedException
所有已实现的接口:
Serializable

public class SMTPSendFailedException
extends SendFailedException

This exception is thrown when the message cannot be sent.

This exception will usually appear first in a chained list of exceptions, followed by SMTPAddressFailedExceptions and/or SMTPAddressSucceededExceptions, * one per address. This exception corresponds to one of the SMTP commands used to send a message, such as the MAIL, DATA, and "end of data" commands, but not including the RCPT command.

从以下版本开始:
JavaMail 1.3.2
另请参见:
序列化表格

字段摘要
protected  InternetAddress addr
           
protected  String cmd
           
protected  int rc
           
 
从类 javax.mail.SendFailedException 继承的字段
invalid, validSent, validUnsent
 
构造方法摘要
SMTPSendFailedException(String cmd, int rc, String err, Exception ex, Address[] vs, Address[] vus, Address[] inv)
          Constructs an SMTPSendFailedException with the specified address, return code, and error string.
 
方法摘要
 String getCommand()
          Return the command that failed.
 int getReturnCode()
          Return the return code from the SMTP server that indicates the reason for the failure.
 
从类 javax.mail.SendFailedException 继承的方法
getInvalidAddresses, getValidSentAddresses, getValidUnsentAddresses
 
从类 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
 

字段详细信息

addr

protected InternetAddress addr

cmd

protected String cmd

rc

protected int rc
构造方法详细信息

SMTPSendFailedException

public SMTPSendFailedException(String cmd,
                               int rc,
                               String err,
                               Exception ex,
                               Address[] vs,
                               Address[] vus,
                               Address[] inv)
Constructs an SMTPSendFailedException with the specified address, return code, and error string.

参数:
cmd - the command that was sent to the SMTP server
rc - the SMTP return code indicating the failure
err - the error string from the SMTP server
方法详细信息

getCommand

public String getCommand()
Return the command that failed.


getReturnCode

public int getReturnCode()
Return the return code from the SMTP server that indicates the reason for the failure. See RFC 821 for interpretation of the return code.



Copyright © 2013. All Rights Reserved.