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.
# File actionmailer/lib/action_mailer/old_api.rb, line 76
def part(params)
ActiveSupport::Deprecation.warn "part() is deprecated and will be removed in future versions. " <<
"Please pass a block to mail() instead."
params = {:content_type => params} if String === params
if custom_headers = params.delete(:headers)
params.merge!(custom_headers)
end
part = Mail::Part.new(params)
yield part if block_given?
@parts << part
end