Allows you to loop through each header in the TMail::Mail object in a block Example:
@mail['to'] = 'mikel@elsewhere.org' @mail['from'] = 'me@me.com' @mail.each_header { |k,v| puts "#{k} = #{v}" } # => from = me@me.com # => to = mikel@elsewhere.org
Source Code
# File action_mailer/vendor/tmail-1.2.2/tmail/mail.rb, line 252 def each_header @header.each do |key, val| [val].flatten.each {|v| yield key, v } end end
<code/>and<pre/>for code samples.