deliver!(mail = @mail)
public
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.
Show source
def deliver!(mail = @mail)
raise "no mail object available for delivery!" unless mail
unless logger.nil?
logger.info "Sent mail to #{recipients.to_a.join(', ')}"
logger.debug "\n#{mail.encoded}"
end
begin
__send__("perform_delivery_#{delivery_method}", mail) if perform_deliveries
rescue Exception => e
raise e if raise_delivery_errors
end
return mail
end