类 DefaultMailErrorHandler

    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型方法说明
      voidhandle​(org.springframework.mail.MailMessage message, java.lang.Exception exception)
      Wraps the input exception with a runtime MailException.
      voidsetMaxMessageLength​(int maxMessageLength)
      The limit for the size of message that will be copied to the exception message.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • setMaxMessageLength

        public void setMaxMessageLength​(int maxMessageLength)
        The limit for the size of message that will be copied to the exception message. Output will be truncated beyond that. Default value is 1024.
        参数:
        maxMessageLength - the maximum message length
      • handle

        public void handle​(org.springframework.mail.MailMessage message,
                           java.lang.Exception exception)
                    throws org.springframework.mail.MailException
        Wraps the input exception with a runtime MailException. The exception message will contain the failed message (using toString).
        指定者:
        handle 在接口中 MailErrorHandler
        参数:
        message - a failed message
        exception - a MessagingException
        抛出:
        org.springframework.mail.MailException - a translation of the Exception
        另请参阅:
        MailErrorHandler.handle(MailMessage, Exception)