Enum Class DSNNotify

java.lang.Object
java.lang.Enum<DSNNotify>
org.bluezoo.gumdrop.smtp.DSNNotify
All Implemented Interfaces:
Serializable, Comparable<DSNNotify>, Constable

public enum DSNNotify extends Enum<DSNNotify>
DSN notification types as defined in RFC 3461 §4.1 (NOTIFY parameter).

These values indicate when the sender wants to receive Delivery Status Notifications for a recipient:

  • NEVER - Never send DSN (mutually exclusive with others)
  • SUCCESS - Send DSN on successful delivery
  • FAILURE - Send DSN on delivery failure
  • DELAY - Send DSN if delivery is delayed

Multiple values (except NEVER) can be combined, e.g., NOTIFY=SUCCESS,FAILURE.

Author:
Chris Burdess
See Also:
  • Enum Constant Details

    • NEVER

      public static final DSNNotify NEVER
      Never send a DSN for this recipient. This is mutually exclusive with all other values.
    • SUCCESS

      public static final DSNNotify SUCCESS
      Send a DSN when the message is successfully delivered.
    • FAILURE

      public static final DSNNotify FAILURE
      Send a DSN when delivery fails permanently.
    • DELAY

      public static final DSNNotify DELAY
      Send a DSN when delivery is delayed (temporary failure).
  • Method Details

    • values

      public static DSNNotify[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DSNNotify valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parse

      public static DSNNotify parse(String keyword)
      Parses a DSN notify keyword.
      Parameters:
      keyword - the keyword to parse (case-insensitive)
      Returns:
      the corresponding DSNNotify value
      Throws:
      IllegalArgumentException - if the keyword is not recognized