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
logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?
begin
send("perform_delivery_#{delivery_method}", mail) if perform_deliveries
rescue Exception => e
raise e if raise_delivery_errors
end
return mail
end