I'm using gem 'delayed_job_active_record'
for sending out emails. When my SignupMailer
is called to send out an email , I see this in my console:
Job Delayed::PerformableMethod (id=23) RUNNING
But the job never completes.
However if I try calling my SignupMailer
directly in rails console, the mail gets sent just fine. Help please?
My classes:
user.rb
def send_init_emails
generate_token(:activation_token)
SignupMailer.delay.welcome(self)
end
signup_mailer.rb:
def welcome(user)
@user = user
mail to: @user.email, subject: 'Welcome!'
end