v4.0.2 - Show latest stable - 0 notes - Class: ActionMailer::Base
headers(args = nil) public

Allows you to pass random and unusual headers to the new Mail::Message object which will add them to itself.

headers['X-Special-Domain-Specific-Header'] = "SecretValue"

You can also pass a hash into headers of header field names and values, which will then be set on the Mail::Message object:

headers 'X-Special-Domain-Specific-Header' => "SecretValue",
        'In-Reply-To' => incoming.message_id

The resulting Mail::Message will have the following in its header:

X-Special-Domain-Specific-Header: SecretValue
Show source
Register or log in to add new notes.