Comment on page
- ActiveJob requires you to specify a backend. there are a few built in by default. We use one of them, called "delayed job"
config.active_job.queue_adapter = :delayed_job
- delayed_job is an external Gem, listed as a dependency in the Gemfile.
When developing with emails locally, make sure mailcatcher is running. assuming mailcatcher is installed (
gem install mailcatcher), in a terminal window just run
mailcatcher, then visit
http://localhost:1080/to see your mails coming through.
Note, for messages to get queued for actual sending, you need to append a delivery call (
deliver_later) otherwise you are just creating a MailMessage object, and it will seem to be failng silently because you're actually not asking for it to be delivered.
this is working for
deliver_nowemails. i am still not sure how deliver_later is working, or whether it's working. i don't see them coming through mailcatcher, and am not sure if it's because the delayed_job queue is not running or something else.
bundle exec rake jobs:workto start a background process for delayed jobs.
Production mails are being sent through sendgrid. we do not have a login for the existing account yet.
Last modified 5yr ago