Remove GenericMailer.delay

This commit is contained in:
Eric Schultz 2019-11-07 15:16:04 -06:00
parent fe9339fccc
commit dd30aa3d59

View file

@ -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