Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 5ddffc8c24
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.822 kB
module ActionMailer
module PartContainer
attr_reader :parts
# 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.
def part(params)
params = {:content_type => params} if String === params
part = Part.new(params)
yield part if block_given?
@parts << part
end
# Add an attachment to a multipart message. This is simply a part with the
# content-disposition set to "attachment".
def attachment(params, &block)
params = { :content_type => params } if String === params
params = { :disposition => "attachment",
:transfer_encoding => "base64" }.merge(params)
part(params, &block)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.