DispositionNotification (JavaMail API documentation)
Date: 2018-05-06

com.sun.mail.dsn

## Class DispositionNotification

- java.lang.Object
- - com.sun.mail.dsn.Report
  - - com.sun.mail.dsn.DispositionNotification

-     public class DispositionNotification
      extends Report

  A message/disposition-notification message content, as defined in RFC 3798.
  Since:
    JavaMail 1.4.2

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected InternetHeaders` | `notifications` The disposition notification content fields.

    - ### Fields inherited from class com.sun.mail.dsn.Report

      `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DispositionNotification()` Construct a disposition notification with no content.
    `DispositionNotification(java.io.InputStream is)` Construct a disposition notification by parsing the supplied input stream.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `InternetHeaders` | `getNotifications()` Return all the disposition notification fields in the disposition notification.
    `void` | `setNotifications(InternetHeaders notifications)` Set the disposition notification fields in the disposition notification.
    `java.lang.String` | `toString()`
    `void` | `writeTo(java.io.OutputStream os)`

    - ### Methods inherited from class com.sun.mail.dsn.Report

      `getType`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### notifications

          protected InternetHeaders notifications

      The disposition notification content fields.

  - ### Constructor Detail

    - #### DispositionNotification

          public DispositionNotification()
                                  throws MessagingException

      Construct a disposition notification with no content.
      Throws:
        `MessagingException`

    - #### DispositionNotification

          public DispositionNotification(java.io.InputStream is)
                                  throws MessagingException,
                                         java.io.IOException

      Construct a disposition notification by parsing the supplied input stream.
      Throws:
        `MessagingException`
        `java.io.IOException`

  - ### Method Detail

    - #### getNotifications

          public InternetHeaders getNotifications()

      Return all the disposition notification fields in the disposition notification. The fields are defined as:

              disposition-notification-content =
                          [ reporting-ua-field CRLF ]
                          [ mdn-gateway-field CRLF ]
                          [ original-recipient-field CRLF ]
                          final-recipient-field CRLF
                          [ original-message-id-field CRLF ]
                          disposition-field CRLF
                          *( failure-field CRLF )
                          *( error-field CRLF )
                          *( warning-field CRLF )
                          *( extension-field CRLF )

    - #### setNotifications

          public void setNotifications(InternetHeaders notifications)

      Set the disposition notification fields in the disposition notification.

    - #### writeTo

          public void writeTo(java.io.OutputStream os)
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms< /a>.