Deliver the given mail object directly. This can be used to deliver a preconstructed mail object, like:
email = MyMailer.create_some_mail(parameters) email.set_some_obscure_header "frobnicate" MyMailer.deliver(email)
# File lib/action_mailer/deprecated_api.rb, line 35 def deliver(mail, show_warning=true) if show_warning ActiveSupport::Deprecation.warn "#{self}.deliver is deprecated, call " << "deliver in the mailer instance instead", caller[0,2] end raise "no mail object available for delivery!" unless mail wrap_delivery_behavior(mail) mail.deliver mail end
# File lib/action_mailer/deprecated_api.rb, line 60 def method_missing(method_symbol, *parameters) if match = matches_dynamic_method?(method_symbol) case match[1] when 'create' ActiveSupport::Deprecation.warn "#{self}.create_#{match[2]} is deprecated, " << "use #{self}.#{match[2]} instead", caller[0,2] new(match[2], *parameters).message when 'deliver' ActiveSupport::Deprecation.warn "#{self}.deliver_#{match[2]} is deprecated, " << "use #{self}.#{match[2]}.deliver instead", caller[0,2] new(match[2], *parameters).message.deliver else super end else super end end
# File lib/action_mailer/deprecated_api.rb, line 56 def respond_to?(method_symbol, include_private = false) matches_dynamic_method?(method_symbol) || super end
# File lib/action_mailer/deprecated_api.rb, line 47 def template_root self.view_paths && self.view_paths.first end
# File lib/action_mailer/deprecated_api.rb, line 51 def template_root=(root) ActiveSupport::Deprecation.warn "template_root= is deprecated, use prepend_view_path instead", caller[0,2] self.view_paths = ActionView::Base.process_view_paths(root) end