instance method
headers
Ruby on Rails 4.1.16
Since v3.0.20Signature
headers(args = nil)
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
Parameters
-
argsopt = nil
Source
# File actionmailer/lib/action_mailer/base.rb, line 613
def headers(args = nil)
if args
@_message.headers(args)
else
@_message
end
end
Defined in actionmailer/lib/action_mailer/base.rb line 613
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Base