Returns a TMail::AddressHeader object of the field you are querying. Examples:
@mail['from'] #=> #<TMail::AddressHeader "mikel@test.com.au"> @mail['to'] #=> #<TMail::AddressHeader "mikel@test.com.au">
You can get the string value of this by passing "to_s" to the query: Example:
@mail['to'].to_s #=> "mikel@test.com.au"
Source Code
# File action_mailer/vendor/tmail-1.2.2/tmail/mail.rb, line 190 def []( key ) @header[key.downcase] end
<code/>and<pre/>for code samples.