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