public Method

Base.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.

Source Code

# File action_mailer/base.rb, line 464
def deliver!(mail = @mail)
  raise "no mail object available for delivery!" unless mail
  logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?

  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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.