public Method

Mail.body=( str )

There's no documentation for this item.

Source Code

# File action_mailer/vendor/tmail-1.1.0/tmail/mail.rb, line 359
def body=( str )
  # Sets the body of the email to a new (encoded) string.
  # 
  # We also reparses the email if the body is ever reassigned, this is a performance hit, however when
  # you assign the body, you usually want to be able to make sure that you can access the attachments etc.
  # 
  # Usage:
  # 
  #  mail.body = "Hello, this is\nthe body text"
  #  # => "Hello, this is\nthe body"
  #  mail.body
  #  # => "Hello, this is\nthe body"
  @body_parsed = false
  parse_body(StringInput.new(str))
  parse_body
  @body_port.wopen {|f| f.write str }
  str
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.