Replace Postmark with AWS SES for email sending and begin sending confirmations for mid/end-of-quarter feedback - #147
Draft
xalbd wants to merge 1 commit into
Draft
Replace Postmark with AWS SES for email sending and begin sending confirmations for mid/end-of-quarter feedback#147xalbd wants to merge 1 commit into
xalbd wants to merge 1 commit into
Conversation
Move all outbound mail to SES, called as a signed REST request via aws4fetch rather than @aws-sdk/client-sesv2, which is far too large for a Worker bundle. Emails are authored once as a block list and rendered twice, to HTML and to plain text, so the text/plain alternative can't drift from the HTML. HTML is built from @react-email/components for its email-client workarounds (Outlook conditional tables, MSO button padding, preheader whitespace trick) but rendered with react-dom/server rather than @react-email/render — that package pulls in html-to-text and js-beautify for features this app doesn't use, at 132 KB gzipped versus 4.8 KB for the whole module as written. Also send a confirmation email for student mid-/end-of-quarter feedback submissions, calling out whether the submitter included a UID, since that's the only way a submission can be credited. The send happens in ctx.waitUntil so a slow SES call can't fail an accepted submission. The commented-out Postmark batch in process-withdraws is rewritten against the new API and its template ported, so uncommenting it works. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
laprogram | 75088b1 | Jul 29 2026, 11:46 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #143 and also fixes #8.
Do not merge yet. This PR has not undergone human review.
Move all outbound mail to SES, called as a signed REST request via aws4fetch rather than @aws-sdk/client-sesv2, which is far too large for a Worker bundle.
Emails are authored once as a block list and rendered twice, to HTML and to plain text, so the text/plain alternative can't drift from the HTML. HTML is built from @react-email/components for its email-client workarounds (Outlook conditional tables, MSO button padding, preheader whitespace trick) but rendered with react-dom/server rather than @react-email/render — that package pulls in html-to-text and js-beautify for features this app doesn't use, at 132 KB gzipped versus 4.8 KB for the whole module as written.
Also send a confirmation email for student mid-/end-of-quarter feedback submissions, calling out whether the submitter included a UID, since that's the only way a submission can be credited. The send happens in ctx.waitUntil so a slow SES call can't fail an accepted submission.
The commented-out Postmark batch in process-withdraws is rewritten against the new API and its template ported, so uncommenting it works.