public Method

Mail.body(to_charset = 'utf-8', &block)

There's no documentation for this item.

Source Code

# File action_mailer/vendor/tmail-1.2.2/tmail/quoting.rb, line 36
def body(to_charset = 'utf-8', &block)
  attachment_presenter = block || Proc.new { |file_name| "Attachment: #{file_name}\n" }

  if multipart?
    parts.collect { |part|
      header = part["content-type"]

      if part.multipart?
        part.body(to_charset, &attachment_presenter)
      elsif header.nil?
        ""
      elsif !attachment?(part)
        part.unquoted_body(to_charset)
      else
        attachment_presenter.call(header["name"] || "(unnamed)")
      end
    }.join
  else
    unquoted_body(to_charset)
  end
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.