instance method each_header

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

each_header()

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
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb, line 309
    def each_header
      @header.each do |key, val|
        [val].flatten.each {|v| yield key, v }
      end
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb line 309 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::Mail

Type at least 2 characters to search.

↑↓ navigate · open · esc close