Proca.Service.SES (proca v3.0.2)

This module lets you send bulk emails via AWS SES.

We use bulk emails for crazy throughput!

For bulk emails you must use templates. We can either create them for each batch and then remove, or we can maintain them somehow in AWS (by a hash?), but there is a limit of them, so some sort of GC would have to be done.

We could also have some other system (for instance WpMailTemplate Server that fetches template, refreshes then every once in a while, and pushes them to SES.)

What sort of emails do we have?

  • thank you emails (one per page)
  • supporter confirm email (one per org?)

ActioPage.thank_you_template_ref (can be null)

MVP:

  • send_batch method that creates a template always, (maybe overwriting?)
  • send_batch then sends the batch
  • and does not care about the template

Link to this section Summary

Functions

XXX this method should later keep track of whether EmailTemplate was changed or not...

Link to this section Functions

Link to this function

create_template(org, email_template)

XXX this method should later keep track of whether EmailTemplate was changed or not...

Link to this function

send_batch(supporters, org, template)

Link to this function

supporters_to_recipients(supporters)