From dd30aa3d594c2f60bc3b1fe610a1d2f90fbd8574 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Thu, 7 Nov 2019 15:16:04 -0600 Subject: [PATCH] Remove GenericMailer.delay --- app/controllers/emails_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/emails_controller.rb b/app/controllers/emails_controller.rb index 95e19c7f..bb3e057b 100644 --- a/app/controllers/emails_controller.rb +++ b/app/controllers/emails_controller.rb @@ -6,7 +6,7 @@ class EmailsController < ApplicationController def create email = params[:email] - GenericMailer.delay.generic_mail(email[:from_email], email[:from_name], email[:message], email[:subject], email[:to_email], email[:to_name]) + GenericMailer.generic_mail(email[:from_email], email[:from_name], email[:message], email[:subject], email[:to_email], email[:to_name]).deliver_later render json: { notification: 'Email successfully sent' }, status: :created end end