Module

PartContainer

Accessors and helpers that ActionMailer::Base and ActionMailer::Part have in common. Using these helpers you can easily add subparts or attachments to your message:

def my_mail_message(...)
  ...
  part "text/plain" do |p|
    p.body "hello, world"
    p.transfer_encoding "base64"
  end

  attachment "image/jpg" do |a|
    a.body = File.read("hello.jpg")
    a.filename = "hello.jpg"
  end
end
Public Attributes
parts The list of subparts of this container
Public Methods
attachment Add an attachment to a multipart message. This is simply a part with the content-disposition set to "attachment".
part Add a part to a multipart message, with the given content-type. The part itself is yielded to the block so that other properties (charset, body, headers, etc.) can be set on it.
Private Methods
parse_content_type
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.