public Method

Mail.from=( *strs )

Destructively sets the "From:" field to the passed array of strings (which should be valid email addresses)

Example:

mail = TMail::Mail.new
mail.from = ["mikel@abc.com", "Mikel <mikel@xyz.com>"]
mail.from #=>  ["mikel@abc.org", "mikel@xyz.org"]
mail['from'].to_s #=> "mikel@abc.com, Mikel <mikel@xyz.com>"

Source Code

# File action_mailer/vendor/tmail-1.2.2/tmail/interface.rb, line 392
def from=( *strs )
  set_string_array_attr 'From', strs
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.