info.mailtraq.com > Management > Script Functions A-Z > DeleteHeader() DeleteHeader()Removes a specified header field and its field contents from the current message. If the specified field occurs more than once, only the first instance is removed. Note that the colon (ASCII 58) field separator used in RFC2822 headers must not be quoted when referring to header names.
DeleteHeader( field )
- field
- The field name to remove from the message header
//Example usage
If(SameAddress(Header("From"), Header("Reply-To")),
DeleteHeader("Reply-To")
)
// Deletion of multiple instance headers
While(Length(Header("To")) > 0,
DeleteHeader("To")
) |