instance method
header_string
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
header_string( name, default = nil )
Allows you to query the mail object with a string to get the contents of the field you want.
Returns a string of the exact contents of the field
mail.from = "mikel <mikel@lindsaar.net>" mail.header_string("From") #=> "mikel <mikel@lindsaar.net>"
Parameters
-
namereq -
defaultopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 49
def header_string( name, default = nil )
h = @header[name.downcase] or return default
h.to_s
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb line 49
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail