There is a special set of expansion variables containing the headers of the message being processed. These variables have names beginning with $header_ followed by the name of the header, terminated by a colon. For example,
$header_from: $header_subject:
The whole item, including the terminating colon, is replaced by the contents of the message header. If there is more than one header with the same name, their contents are concatenated, with a single newline character between them. The capitalization of the name following $header_ is not significant. Because any printing character except colon may appear in the name of a message's header (this is a requirement of RFC 2822, the document that describes the format of a mail message) curly brackets must not be used in this case, as they will be taken as part of the header name. Two shortcuts are allowed in naming header variables:
The initiating $header_ can be abbreviated to $h_.
The terminating colon can be omitted if the next character is white space. The white space character is retained in the expanded string. However, this is not recommended, because it makes it easy to forget the colon when it really is needed.
If the message does not contain a header of the given name, an empty string is substituted. Thus it is important to spell the names of headers correctly. Do not use $header_Reply_to when you really mean $header_Reply-to.