Next: , Previous: , Up: Library   [Contents][Index]

5.17 Current Message Functions

Built-in Function: number current_message ()

This function can be used in eom handlers only. It returns a message descriptor referring to the current message. See Message functions, for a description of functions for accessing messages.

The functions below access the headers from the current message. They are available in the following handlers: eoh, body, eom.

Built-in Function: number current_header_count ([string name])

Return number of headers in the current message. If name is specified, return number of headers that have this name.

  current_header_count() ⇒ 6
  current_header_count("Subject") ⇒ 1
Built-in Function: string current_header_nth_name (number n)

Return the name of the nth header. The index n is 1-based.

Built-in Function: string current_header_nth_value (number n)

Return the value of the nth header. The index n is 1-based.

Built-in Function: string current_header (string name [, number n])

Return the value of the named header, e.g.:

  set s current_header("Subject")

Optional second argument specifies the header instance, if there are more than 1 header of the same name, e.g.:

  set s current_header("Received", 2)

Header indices are 1-based.

All current_header function raise the e_not_found exception if the requested header was not found.


Next: , Previous: , Up: Library   [Contents][Index]