I am trying to send emails from my app using sidekiq. after going through docs I could understand is we are configure the activejob to use sidekiq with config.active_job.queue_adapter = :sidekiq
My problem is, I am using one mailer with 3 different methods to send 3 different emails how should I configure it? Like should I have separate Jobs/workers for each email method? And which is optimized way to use active job or sidekiq worker?
class TestMailer < ApplicationMailer
def register(customer)
@customer = customer
mail(to: @customer.email, subject: 'TEST')
end
def success(customer)
@customer = customer
mail(to: @customer.email, subject: 'TEST2')
end
end
Any pointers will be helpful.