instance method
deliver!
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
deliver!(mail = @mail)
Delivers a TMail::Mail object. By default, it delivers the cached mail object (from the create! method). If no cached mail object exists, and no alternate has been given as the parameter, this will fail.
Parameters
-
mailopt = @mail
Source
# File actionmailer/lib/action_mailer/base.rb, line 518
def deliver!(mail = @mail)
raise "no mail object available for delivery!" unless mail
unless logger.nil?
logger.info "Sent mail to #{Array(recipients).join(', ')}"
logger.debug "\n#{mail.encoded}"
end
begin
__send__("perform_delivery_#{delivery_method}", mail) if perform_deliveries
rescue Exception => e # Net::SMTP errors or sendmail pipe errors
raise e if raise_delivery_errors
end
return mail
end
Defined in actionmailer/lib/action_mailer/base.rb line 518
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Base