Emails - rubyforgood/casa GitHub Wiki

Table of Contents generated with DocToc

HOW we send emails

https://app-smtp.brevo.com/log

Emails we send:

https://casa-qa.herokuapp.com/rails/mailers

How to send impromptu emails

just in case we have to do this again

ActiveSupport::Notifications.unsubscribe "process.action_mailer"

user = User.find_by(email: "emailllll")

mailer = ActionMailer::Base.new
mailer.attachments["case-contacts-report-#{Time.zone.now.to_i}.csv"] = {mime_type: 'text/csv', content: case_contact_report.to_csv }
mailer.mail(
  from: "no-reply@#{ENV["DOMAIN"]}",
  to: user.email,
  subject: "Custom report for ",
  body: "Custom report for ",
  ).deliver