instance method sender_addr=

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

sender_addr=( addr )

Destructively set the to value of the “Sender:” header to equal the passed in argument.

TMail will parse your contents and turn each valid email address into a TMail::Address object before assigning it to the mail message.

Example:

mail = TMail::Mail.new
mail.sender_addrs = "Mikel <mikel@me.org>, another Mikel <mikel@you.org>"
mail.sender_addrs #=>  [#<TMail::Address mikel@me.org>, #<TMail::Address mikel@you.org>]

Parameters

addr req
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb, line 498
    def sender_addr=( addr )
      if addr
        h = HeaderField.internal_new('sender', @config)
        h.addr = addr
        @header['sender'] = h
      else
        @header.delete 'sender'
      end
      addr
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb line 498 · 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