Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c5c4933
feat(emails): send transactional email and read its status
Silthus Nov 2, 2026
dc04ec9
fix(emails): bound each request, parse replies in the SDK, require an…
Silthus Nov 2, 2026
9a35f9c
fix(emails): run each request in a monitored worker, not a linked task
Silthus Nov 2, 2026
a04a561
fix(emails): stop the request worker when its caller dies
Silthus Nov 2, 2026
6392363
fix(emails): keep request worker failures out of the caller
Silthus Nov 2, 2026
2244ae8
test(emails): run the default-instance test in the PostHog group
Silthus Nov 2, 2026
f949515
test(emails): keep the flag loader out of the default-instance test
Silthus Nov 2, 2026
cb165cc
fix(emails): retry pool checkout timeouts and stop retries after shut…
Silthus Nov 2, 2026
da5e56c
docs(emails): say that secret_key also turns on flag polling to api_host
Silthus Nov 2, 2026
919a313
feat(emails): send cc, bcc and attachments
Silthus Nov 4, 2026
0b25554
fix(emails): return a client exit as an error, not a crash
Silthus Nov 4, 2026
cbfc669
Merge branch 'feat/emails-send' into feat/emails-attachments
Silthus Nov 4, 2026
0852380
docs(emails): say that attachment content is raw bytes, not Base64
Silthus Nov 4, 2026
74dd12e
refactor(emails): name a client exit instead of commenting it
Silthus Nov 4, 2026
1ee3842
Merge remote-tracking branch 'origin/feat/emails-send' into feat/emai…
Silthus Nov 4, 2026
99a76e4
fix(emails): name string and odd attachment keys, and why a template …
Silthus Nov 4, 2026
3d04164
fix(emails): ask for atom keys when a string key names an attachment …
Silthus Nov 4, 2026
1e1ff2d
Merge remote-tracking branch 'origin/main' into feat/emails-attachments
Silthus Nov 6, 2026
f785113
Merge remote-tracking branch 'origin/main' into feat/emails-attachments
Silthus Nov 9, 2026
3de2ed2
feat(emails): upload attachments by hash, then send references
Silthus Nov 9, 2026
82e72be
fix(emails): name attachments when PostHog refuses the uploads withou…
Silthus Nov 9, 2026
57bbab8
refactor(emails): prepare attachments beside the content, one templat…
Silthus Nov 9, 2026
3099158
fix(emails): upload with a plain request, and stop a send whose insta…
Silthus Nov 9, 2026
881cafa
fix(emails): keep app-wide Req defaults off uploads, and retry a stor…
Silthus Nov 9, 2026
0cfcb3d
fix(emails): upload with a bare request, and hash files only once the…
Silthus Nov 9, 2026
f059d04
fix(emails): run uploads on the installed Req's default adapter
Silthus Nov 9, 2026
1d50bfd
test(emails): upload over a real socket with Req's default adapter
Silthus Nov 9, 2026
0184d8c
fix(emails): count the subject toward the size limit, and give upload…
Silthus Nov 10, 2026
691d833
fix(emails): leave the size of an email without files to PostHog
Silthus Nov 10, 2026
0a558e1
test(emails): check the whole body reaches PostHog when a send has no…
Silthus Nov 10, 2026
75d83f8
test(emails): send the email without files to a real socket, through …
Silthus Nov 10, 2026
b041927
test(emails): drive cc, bcc and attachments through a behaving fake P…
Silthus Nov 10, 2026
8d3b81f
test(emails): let the storage fake refuse unsigned headers and a wron…
Silthus Nov 10, 2026
14761d9
test(emails): refuse in the storage fake only what S3 refuses on a pr…
Silthus Nov 10, 2026
a96da42
test(emails): prove an upload ignores the app's Req defaults by what …
Silthus Nov 10, 2026
f124592
test(emails): let the fake PostHog size an email as PostHog does
Silthus Nov 10, 2026
0447cd0
test(emails): count the upload route's requests, not the sleep hook, …
Silthus Nov 10, 2026
357c5d3
fix(emails): count the text PostHog derives and upload only over https
Silthus Nov 10, 2026
6dfb73c
fix(emails): point an oversized HTML-only email at :text, and test up…
Silthus Nov 10, 2026
d4dabd7
fix(emails): read only the start of the storage's answer to an upload
Silthus Nov 10, 2026
3ffb13d
test(emails): prove an upload never follows the storage's redirect
Silthus Nov 10, 2026
f02dc0b
test(emails): drop the upload quota from the fake PostHog
Silthus Nov 10, 2026
c67d894
Merge main into feat/emails-attachments
Silthus Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .sampo/changesets/emails-attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
hex/posthog: minor
---

`PostHog.Emails.send/2` takes `cc`, `bcc` and `attachments` on a send with `template_key`. `cc` and `bcc` are one address or a list. Each attachment is a map with `filename`, `content` (the file's raw bytes) and optionally `content_type` and `content_id`. An email carries at most 10 files and 40 MB after Base64 encoding, about 29 MB of files. The SDK hashes each file, uploads the files PostHog doesn't have yet straight to PostHog's file storage, over https and without the secret key, and then sends the email with references to them. Plain-HTTP uploads are allowed only when `app_host` is plain HTTP, as in local development. If an upload fails, it sends nothing and returns `attachment_upload_failed`. An empty `reply_to`, `cc`, `bcc` or `attachments` list is now left out of the request.
Loading
Loading