LogoLogo
Work with usToolboxPodcast
  • About this Handbook
  • Our organization
    • 📖History
    • 🏛️Constitution & Governance
      • 📜Articles of Association
      • 🎆Regional nodes & entities
    • 💟Our Values & Principles
    • 🗣️Partners and Associates
  • Agreements
    • People Agreement
    • Decision Agreement
      • Decision process for new GT courses
    • Financial Agreement
  • Working Together
    • 🥁Rhythms & Rituals
    • 💬Communication Practices & Tools
    • 📈Sales process & team formation
    • 🌱Development Bucket
    • 💸Biz Dev Bucket
    • 💚Spirit Bucket
  • Guides
    • ⛴️On & offboarding
    • 😎Setting up projects
    • 💰Finance - Overview
    • 📎Everything you need to know about invoicing
    • 👥How to use our CRM
    • 🎪Attending Events
  • Projects
    • Cobudget
      • Development
      • Deployment
      • Email
    • Greaterthan Academy
  • Archive
    • 💬Organizational tools
Powered by GitBook
LogoLogo

What we do

  • Services
  • Academy
  • Events

Connect

  • Email us
  • Find a coach
  • Join our newsletter

This work is licensed under Creative Commons Attribution-ShareAlike

On this page
  • Stack
  • Development
  • Production
  • Sending
  • Log reporting emails
Edit on GitHub
Export as PDF
  1. Projects
  2. Cobudget

Email

Last updated 7 years ago

Stack

  • Email sending leverages Rails'

  • Action mailer is integrated with , which is a generic API for queueing jobs

  • ActiveJob requires you to specify a backend. there are a few built in by default. We use one of them, called "delayed job"

  • in cobudget-api/config/application.rb: config.active_job.queue_adapter = :delayed_job

  • delayed_job is an external Gem, listed as a dependency in the Gemfile.

Development

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 (deliver_now, 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_now emails. 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.

run bundle exec rake jobs:work to start a background process for delayed jobs.

additional info about delayed_job at

Production

Sending

Production mails are being sent through sendgrid. we do not have a login for the existing account yet.

Log reporting emails

config/initializers/delayed_job_airbrake.rb seems to be configured to work with on production, but there are no airbrake settings configured on heroku.

action mailer
active job
delivery call
https://github.com/collectiveidea/delayed_job/wiki/Delayed-job-command-details
airbrake