instance method
sender_addr
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
sender_addr( default = nil )
Return a TMail::Addresses instance of the “Sender:” field of the mail object header.
If the “Sender:” field does not exist, will return nil by default or the value you pass as the optional parameter.
Example:
mail = TMail::Mail.new mail.sender #=> nil mail.sender([]) #=> [] mail.sender = "Mikel <mikel@me.org>" mail.reply_to_addrs #=> [#<TMail::Address mikel@me.org>]
Parameters
-
defaultopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb, line 483
def sender_addr( default = nil )
f = @header['sender'] or return default
f.addr or return default
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb line 483
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail