This page covers how Newsletter content is published via email. That content is also manually cross-published like blog posts to the https://www.peels.app/newsletter page. See Markdown Pages for more information on that.
Email newsletters mirror (and are done after) their Markdown Pages counterparts. They live in supabase/functions/templates
. For example: newsletter-issue-one-email
contains the contents of Issue 1: Celebrating the First Few Months of Peels that match its https://www.peels.app/newsletter/celebrating-the-first-few-months web counterpart.
They are sent in two parts, to our two respective newsletter audience (subscriber) types:
send-email-for-newsletter-issue-supabase-users
send-email-for-newsletter-issue-resend-audience
The resend-audience
edge function is ready to go, and therefore dangerous. Start with the supabase-users
edge function first.
<aside> 👉
Use the testEmail
functionality in the supabase-users
edge function to test this email to yourself before sending it out to anyone. There are bound to be tweaks made.
</aside>
Note that the supabase-users
edge function looks for a emailed_latest_issue
column. This should be deleted after an issue is sent out. That way we re-add it for next time.