Remove GenericMailer.delay
This commit is contained in:
parent
fe9339fccc
commit
dd30aa3d59
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue