Module: ActionMailer::OldApi
- Extended by:
- ActiveSupport::Concern
- Defined in:
- actionmailer/lib/action_mailer/old_api.rb
Overview
:nodoc:
Instance Method Summary (collapse)
-
- (Object) attachment(params, &block)
Add an attachment to a multipart message.
-
- (Object) part(params) {|part| ... }
Add a part to a multipart message, with the given content-type.
- - (Object) process(method_name, *args)
Methods included from ActiveSupport::Concern
append_features, extended, included
Instance Method Details
- (Object) attachment(params, &block)
Add an attachment to a multipart message. This is simply a part with the content-disposition set to "attachment".
101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'actionmailer/lib/action_mailer/old_api.rb', line 101 def (params, &block) params = { :content_type => params } if String === params params[:content] ||= params.delete(:data) || params.delete(:body) if params[:filename] params = normalize_file_hash(params) else params = normalize_nonfile_hash(params) end part(params, &block) end |
- (Object) part(params) {|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.
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'actionmailer/lib/action_mailer/old_api.rb', line 86 def part(params) 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 |
- (Object) process(method_name, *args)
73 74 75 76 77 78 79 80 81 |
# File 'actionmailer/lib/action_mailer/old_api.rb', line 73 def process(method_name, *args) initialize_defaults(method_name) super unless @mail_was_called create_parts create_mail end @_message end |