Closed phazel closed 7 years ago
Treating this as the meta-issue to track progress on this feature. I wanted to use a milestone, but milestone descriptions don't seem to support proper markdown so the formatting was all whacked.
Slightly updated diagram (main difference is that the group-mail-receiver
is triggered by S3, not SES:
It works!
As a super admin, I want to email everyone in my organisation, so I can mobilise them.
WHEN I send an email to everyone@my-org.click, THEN it gets sent to all members.
Out of scope:
We're doing a simpler version which is just about sending to everyone in an organisation, and then extending it to groups later. For now we're ignoring groups.
Glorious architecture diagram of great justice:
Clockwise from top-left:
161 SES uploads the email content into an S3 bucket
140 SES invokes a lambda (the group-mail-receiver) with the email metadata
140 The group-mail-receiver sends an HTTP POST to the group-mailer.
141 The group-mailer resolves the 'everyone' request into a concrete list of members, which it is able to do because it listens for events such as
member-registered
, etc.141 The group-mailer puts a
send-email
event onto the stream, which includes a reference to the S3 object, but not the full email body163 The mailer receives the event via the its event-forwarder lambda.
163 The mailer retrieves the full email data from S3, and sends the email to everyone listed in the event, via SES.
163 (not shown) The mailer puts success/failure events back on the stream.