Skip to content

feat(emails): send one email to many recipients with batch/2 - #266

Open
Silthus wants to merge 43 commits into
feat/scheduled-email-sendfrom
feat/batch-email-send
Open

Silthus wants to merge 43 commits into
feat/scheduled-email-sendfrom
feat/batch-email-send

Conversation

@Silthus

@Silthus Silthus commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Sending the same email to many people now takes one call: PostHog.Emails.batch(recipients: [...], template_id: ...), one email per recipient, with :template_data per recipient for a template. Today a caller loops over send/2, one request per recipient. The server route, POST /api/messaging/send/email_batch/, comes in PostHog/posthog#138258 and PostHog/posthog#138025, behind workflows-email-batch-sends.

It ports emails.batch from the Python SDK (PostHog/posthog-python#1291), the reference: the same limits, statuses, error codes, retries and 24-hour replay window. The Node change (PostHog/posthog-js#5847) shares the limits, statuses and codes, but sends a batch once without retries.

Stacked on #264 (scheduled_at), since both change lib/posthog/emails.ex.

Impact

A batch replaces a loop of single sends for digests, invites and announcements, and keeps each recipient's result readable. The SDK carries no flag of its own; the server flag decides who can send batches, and a project without it answers 404, which the SDK names.

What changes

  • PostHog.Emails.batch/2, in the template form (:template_id, shared :template_data, per-recipient :template_data) and the code form (:template_key and the content send/2 takes). A batch takes no :cc, :bcc, :attachments or :scheduled_at. Before any request, the SDK refuses those fields, a recipient without :to, an unknown recipient field, and two recipients with one key. Each refusal names the recipient's position.
  • One request per call: a batch takes at most 100 recipients and goes out in one request. More than 100 is refused with invalid_recipients before anything is sent, and its fix says to split the recipients into batches of 100 or fewer. The SDK checks no byte size: PostHog's limits decide.
  • One email per recipient, even on retries: each recipient carries an :idempotency_key, given or made by the SDK, that every retry reuses. Each attempt waits 45 seconds, or the configured timeout when longer, since the server waits up to 30 seconds on its email pipeline. Retries follow the single send's rules, and stop an hour after the first attempt, timed on both the monotonic and the system clock so a host suspension counts, whatever :max_retries says, so no retry reaches PostHog after its 24-hour replay window.
  • A result per recipient, as PostHog.Emails.BatchEmailResult in PostHog.Emails.BatchResult, in the order of :recipients. Each result carries status ("queued", "failed" or "unconfirmed"), message_id, replayed and error.
    • A retry carries the same keys, so PostHog's answer to it covers the first attempt too. Once an answer is lost, a refused retry can't show that the first attempt didn't queue the email, so those recipients stay unconfirmed with the error of the refusal and the advice to resend with the same key.
    • After a lost answer, a 5xx, or a whole-request answer PostHog marks as uncertain (409 idempotency_key_in_flight, delivery_unavailable or api_error in its body), every recipient is unconfirmed.
    • A slot answered delivery_unavailable, idempotency_key_in_flight or api_error is unconfirmed, since PostHog may still queue it. Any other slot error is failed.
    • An unconfirmed email's error has a fix that says to send it again, unchanged, with the same :idempotency_key within 24 hours of the key's first use, so it goes out once. The SDK makes no request after the batch, so nothing fills in a message ID PostHog didn't name.
  • A batch PostHog refuses as a whole returns {:error, %PostHog.Emails.BatchError{}}. It carries the error fields Error has, plus every result and the warnings.
    • A 429, whatever its body says, fails the request's recipients that aren't already unconfirmed, since PostHog refused it before queuing any. So does another 4xx without one of the uncertain codes above.
    • 413 content_too_large means the request is too large, and comes back as the error with PostHog's fix to split the recipients into smaller batches. For a 413 without a body, the SDK fills in that code and a fix.
    • 400 content_too_large means the content or :template_data shared by every recipient passes PostHog's limit, where splitting doesn't help. It comes back with PostHog's own words and no split advice.
    • After a lost answer or a 503, a refused retry leaves its recipients unconfirmed. The message keeps PostHog's words and says the email may still go out, and the fix says to resend unchanged with the same key, then gives PostHog's own advice if it refuses again. A stop during the backoff says the SDK sent no further request.
    • A 413 on a batch of one says to make the email smaller rather than to split.
  • A 409 whose body the SDK can't read leaves every recipient unconfirmed, since it may be a key still in flight.
  • 409 batch_unavailable is not retried, and its fix says to send each email with send/2 and its key. A 404 that names no field says PostHog found no template with this ID, or batch sends aren't available for the project, and fails every recipient. Its fix says to check the template ID, then send each recipient on its own. It never suggests updating PostHog. After a lost answer, the recipients stay unconfirmed with their keys.
  • A refused recipient field keeps PostHog's name, such as recipients__37__to, which is the caller's position.
  • An instance stopped during a batch sends no retry: the batch returns client_closed. A request already in flight when it stops returns its own outcome, as the docs say.
  • Warnings come back once on BatchResult.warnings and are logged once.
  • Validation errors, a disabled client or a missing key still return a plain PostHog.Emails.Error, since nothing was sent.

Where it differs from Python

  • Errors come back as {:error, ...} tuples with Elixir codes (invalid_recipients, invalid_recipient, invalid_idempotency_key, invalid_template_data), not TypeError or ValueError. A recipient error's :field is recipients__<i>__<field>, the same form as the server's.
  • nil and an empty :cc, :bcc or :attachments count as left out, as on send/2.
  • Elixir has no async client, so there is no async variant.

Warning

🟡 Merge risk: medium, 🔴 at full rollout · one-way door once released: the public names PostHog.Emails.batch/2, BatchResult, BatchEmailResult, BatchError and the three statuses

  • Merge reaches no one: batch/2 is new, no existing call changes, and the server flag is on for an internal project only. Once a maintainer approves the release, Hex fixes the names above.
  • send/2 and get/2 keep their request bytes, timeout and parse. A send's retries now stop an hour after its first attempt, which only a :max_retries far above the default reaches; such a send returns its last error where base went on. Status reads and attachment uploads keep base's retries.
  • An instance restarted under the same name during a call's retry wait now ends the call with client_closed, for send/2 and get/2 too. On base the retry went out through the new instance. After a try PostHog didn't confirm, a stopped or restarted send/2 now says the email may still go out, and its fix names the key to resend it with, where base said no email was sent. Some private helpers in PostHog.Emails became @doc false functions so the batch module can reuse them; the existing send tests cover them.
  • The failure paths, a lost answer, a 5xx, an in-flight slot and a stop, run on fakes only. A bug there is silent, a second email or none with no error, which is why the grade rises to high at full rollout.
  • Switch-off: the server flag workflows-email-batch-sends, which answers 404 while off. None in the SDK: fix forward.
  • Tier: non-critical

Rollout

  • Stages: merge; the server flag on for an internal project, then staged to more projects on the server side; then the SDK release, with a maintainer's approval, once customers can use the server route.
  • Watch: no alert pages on batch sends. Watch the share of failed emails in the server's email status rows through each flag stage, and batch route 5xx, 409 and 404 answers.

💚 How did you test it?

Unit tests in test/posthog/emails_batch_test.exs through the API.Mock client, written before the code:

  • the request body of each form, and refusals before any request, 101 recipients among them;
  • 100 recipients in one request;
  • the per-attempt timeout;
  • a refused retry after a lost answer leaving each recipient unconfirmed;
  • a whole-call 429, a 413 with its split fix, a 400 content_too_large without it, and a refused field;
  • exhausted network errors leaving each email unconfirmed, with no request after the batch;
  • 409 batch_unavailable not retried, and a 404 without a field, after a lost answer too;
  • an answer without a result per recipient;
  • warnings once, and an in-flight slot staying unconfirmed;
  • a stop during a retry wait, and an instance restarted under its name.

Review fixes added tests for a host suspension during a retry wait, a 409 without a readable body, warnings kept in PostHog's order, an uncertain slot without a detail, a status read retrying past the hour, a stop after a 503 or a lost answer on send/2, a recipient field named nil, a 429 without a body, a 409 after a lost answer, retries stopping an hour after the first attempt, going on when the wall clock jumps, stopping after a wait that overran the hour and returning client_closed when the instance stopped during it, a 429 coded api_error, and the scheduled send's clock after a 429.

Breaking the main guarded behaviours one at a time made at least one test fail each. Locally, mix compile --warnings-as-errors, mix format --check-formatted, mix credo --strict, mix posthog.public_api --check and mix test pass, except one public API task test that needs git inside the test container.

Live run on PostHog Cloud US at this head, template form: a batch of two in one request came back queued with two message IDs in order, the same batch with the same keys returned the same IDs and sent nothing more, and both emails arrived once with their own per-recipient data. A shadow diff of 20 send and status scenarios on the base and this head records identical requests and results.

Known issues

  • minor: lib/posthog/emails.ex:202 The one-hour retry cap counts from this call. A rerun with a stored key started in the last hour of the key's 24 hours can see a retry land after them, and PostHog may then send that email again. The docs say to pass max_retries: 0 for such a rerun.
  • minor: lib/posthog/emails/batch.ex:289 When the instance stops while the request is in flight and every recipient comes back queued, the batch returns {:ok, ...} rather than client_closed, and a lost answer returns network_error. Each result holds what PostHog answered, and the docs say so.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran sampo add to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written by Claude Opus 5.5 (claude-opus-5-5, high effort) in Claude Code, ported test-first from the Python reference. Reviews run on GPT-6.2 Sol through Hedge proof.

Question Answer Who Where
Build batch for every SDK Yes, now, stacked on the scheduled-send PR 👍 a private planning thread
One request per call A batch takes at most 100 recipients and sends one request; PostHog's refusals, 413 included, come back as the error. Replaced: chunks of 100 recipients and 4 MiB sent one after another 👤 the conductor's brief
Drop the reads by key No request after the batch: an unconfirmed email stays unconfirmed with its key, and its fix says to resend with the same key. Replaced: reads by key at the end of every batch 👤 the conductor's brief
Contract for unconfirmed recipients as the Node SDK and the server set it: a whole-request 409 in flight leaves every recipient unconfirmed, and batch_unavailable is read from the body and not retried 👤 the conductor's brief
A refused retry after a lost answer The recipients stay unconfirmed and keep the advice to resend with the same key. Rejected: the retry's refusal decides, which can make a caller resend with a new key and send twice 🤖 the conductor's decision
Shape of a whole-request failure A BatchError exception with the Error fields copied flat, plus results and warnings. Rejected: results on Error 🤖 this PR

Involvement: no grilling rounds, no prototypes; a review panel (design, anti-overengineering), fixes reads and final reads on GPT-6.2 Sol, one approved by Michael after the loop stopped and the later ones run by the agent; live runs captured.

🤖 Generated with Claude Code

How did you test this code?

Merge card: medium, one-way door · 3 rounds, 27 final reads · gaps: judge (🤖 agent d-9def84b3) · 2 known issues · 1735 min opened to ready

Proof What ran Result Commit
live-run one batch of two in one request on PostHog Cloud US from this head, then the same batch with the same keys, then status reads and the mailbox both queued with their own data and arrived once each; the same keys returned the same ids and sent nothing more 8448213 (reused from 277f179)
shadow-diff the 20 send and status scenarios of the shared shadow test on the base and on this head, against a local fake identical requests and results on both sides: send and get behave as on the base 8448213 (reused from 18e5ee6)
Review 5-lens panel (gpt-6.2-sol, claude-opus-5-5), round 1, round 2, final read 1, final read 2, round 3, final read 3, final read 4, final read 5, final read 6, final read 7, final read 8, final read 9, final read 10, final read 11, final read 12, final read 13, final read 14, final read 15, final read 16, final read 17, final read 18, final read 19, final read 20, final read 21, final read 22, final read 23, final read 24, final read 25, final read 26, final read 27 198 findings: 86 fixed, 112 rejected, 0 other 5091cfb to 8448213
Proof judge an independent model reads the evidence against the diff ❌ failed at 8448213
PR Review rounds Production lines Sanity pass Skipped proofs
#266 3 rounds, 27 final reads 1,715 → 2,176 (×1.3); docs 5 → 5 not run judge: The new 404 points are whitespace codes and fields: the SDK reads every code and field with text/1, and the conductor's rule says to read them the way the SDK does today; PostHog never answers whitespace there. Ending retries on a forward wall-clock step is the chosen trade-off for the suspension finding, the stored-key rerun near its 24 hours is documented with max_retries: 0 and listed under Known issues, the test notes were answered with evidence in every read, and prod-shape is decided as a gap. (🤖 agent d-9def84b3)

Not checked: none recorded
Full receipt: https://artifacts.posthog.com/a/WprqVOInQknMGq4TFpbDBz

PostHog.Emails.batch/2 sends a template or code content to up to
100 recipients and 4 MiB per request, one request after another, with
an idempotency key per recipient that every retry reuses, and returns
a result per recipient in order. A request that fails as a whole
returns a BatchError with every recipient's result. Ported from the
Python SDK's emails.batch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

posthog-elixir Compliance Report

Date: 2026-11-25T15:42:35.555770+00:00
Duration: 111167ms

✅ All Tests Passed!

47/47 tests passed


Capture Tests

✅ 30/30 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 608ms
Format Validation.Event Has Uuid ✅ 608ms
Format Validation.Event Has Lib Properties ✅ 608ms
Format Validation.Distinct Id Is String ✅ 608ms
Format Validation.Token Is Present ✅ 609ms
Format Validation.Custom Properties Preserved ✅ 609ms
Format Validation.Event Has Timestamp ✅ 608ms
Format Validation.Non Utc Event Timestamp Is Converted To Utc ✅ 609ms
Retry Behavior.Retries On 503 ✅ 5614ms
Retry Behavior.Does Not Retry On 400 ✅ 2611ms
Retry Behavior.Does Not Retry On 401 ✅ 2611ms
Retry Behavior.Respects Retry After Header ✅ 5610ms
Retry Behavior.Implements Backoff ✅ 15616ms
Retry Behavior.Retries On 500 ✅ 5615ms
Retry Behavior.Retries On 502 ✅ 5614ms
Retry Behavior.Retries On 504 ✅ 5611ms
Retry Behavior.Max Retries Respected ✅ 15624ms
Deduplication.Generates Unique Uuids ✅ 618ms
Deduplication.Preserves Uuid On Retry ✅ 5613ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10619ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5615ms
Deduplication.No Duplicate Events In Batch ✅ 613ms
Deduplication.Different Events Have Different Uuids ✅ 611ms
Compression.Sends Gzip When Enabled ✅ 608ms
Batch Format.Uses Proper Batch Structure ✅ 608ms
Batch Format.Flush With No Events Sends Nothing ✅ 606ms
Batch Format.Multiple Events Batched Together ✅ 612ms
Error Handling.Does Not Retry On 403 ✅ 2611ms
Error Handling.Does Not Retry On 413 ✅ 2612ms
Error Handling.Retries On 408 ✅ 5613ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 7ms
Request Payload.Flags Request Uses V2 Query Param ✅ 5ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 6ms
Request Payload.Flags Request Omits Authorization Header ✅ 5ms
Request Payload.Token In Flags Body Matches Init ✅ 5ms
Request Payload.Groups Round Trip ✅ 5ms
Request Payload.Groups Default To Empty Object ✅ 5ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 5ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 6ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 5ms
Request Lifecycle.No Flags Request On Init Alone ✅ 2ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 608ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 9ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 607ms
Retry Behavior.Retries Flags On 502 ✅ 911ms
Retry Behavior.Retries Flags On 504 ✅ 911ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 1211ms

Silthus and others added 28 commits November 24, 2026 10:01
… the end

A read by key now only fills in the message id and never changes the
recipient's status. A request answered idempotency_key_in_flight,
delivery_unavailable or api_error leaves its recipients unconfirmed,
also after a later refusal. Every batch, on success and on error,
reads each unconfirmed recipient without a message id at its end.

An exception from the HTTP client after the first request returns a
BatchError with every result, the batch stays bound to the instance it
started on, a stop before a request leaves its recipients
not_attempted, and each request body is built only when its request
starts. The batch reuses the single send's form checks and retry
driver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…feat/batch-email-send

# Conflicts:
#	lib/posthog/emails.ex
…d retries

A stop during the reads by key now fails the batch after a successful
request too. A 429 without a body fails the request instead of leaving
it unconfirmed. A later lost answer keeps a recipient's first error and
records the later one. The backoff stops doubling past its cap, so a
high max_retries can't overflow it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read

Retries now stop an hour after the first attempt, so none can land
after PostHog forgets the idempotency key. A stop that lands while a
read by key is in flight now returns client_closed. A lost retry no
longer replaces the last answer PostHog gave in later_error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tled batch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…feat/batch-email-send

# Conflicts:
#	lib/posthog/emails.ex
… key

Drop the reads by key at the end of a batch. An unconfirmed email keeps its idempotency key, and its error's fix says to send it again with the same key within 24 hours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An unconfirmed email's fix now says to resend it unchanged with the same key within 24 hours of the key's first use. An answer without a result per recipient after a lost answer lands in later_error. The key docs say a reused key for another email is refused with idempotency_key_reused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The retry window is checked again after each wait, so a pause during the backoff can't send a retry past the hour. The batch docs say a request in flight when the instance stops returns its own outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…try window

A wait that both overran the hour and saw the instance stop returned the last answer. It now returns client_closed, as the next attempt would have. The overrun test asserts that PostHog received a single request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A batch now takes at most 100 recipients and goes out in one request. More than 100 is refused before anything is sent. PostHog's refusals, such as 413 too_large, come back as the error, and the 413 fix says to split the recipients. The chunk loop, the 4 MiB sizing, not_attempted and later_error are gone: the last answer decides each result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PostHog answers an oversized batch with 413 content_too_large and its own fix. The SDK now keeps that fix and fills in the code and a fix only for a 413 without a body. The hour and shutdown tests assert the requests PostHog received.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…swer is refused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sends

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…irmed answer

Retries also stop when a wait ends exactly at the one-hour cutoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent the email

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, through retries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bodyless 413 default no longer claims nothing was sent, empty fields
no longer override the defaults, and a test sends a batch over 4 MiB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…used retry

A stop during the backoff now says the SDK sent no further request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…used batch

The message of a refused retry no longer says an answer was lost after a
503, and a top-level idempotency_key asks for one key per recipient.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 413 body whose fields aren't text keeps the SDK's advice, and an
improper list of recipients is refused as not a list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-recipient batch as too large

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es as too large

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus and others added 8 commits November 24, 2026 23:21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one-recipient 413 to resending

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s second request

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus marked this pull request as ready for review November 25, 2026 11:27
@Silthus
Silthus requested a review from a team as a code owner November 25, 2026 11:27
@veria-ai

veria-ai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Fixed/addressed: 1 · PR risk: 0/10

Reviews

@posthog posthog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 1249191: 1 Should fix. This pull request is large, so the review ran in 4 parts with less depth than usual.

New pushes to this pull request won't start an automatic review. Comment @posthog review to review new changes.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

Comment thread lib/posthog/emails.ex Resolved
Comment thread lib/posthog/emails/batch.ex Resolved
Silthus and others added 4 commits November 25, 2026 12:47
…confirmed

A send's retry window now also ends when the system clock passes the hour, so a host suspension counts. A batch 409 whose body can't be read leaves every recipient unconfirmed. Batch warnings dedupe in one pass, in the order PostHog named them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a stop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good; no qualifying findings. Verdict: correct.

Silthus and others added 2 commits November 25, 2026 16:25
PostHog answers the same 404 for an unknown template_id, a project
without batch sends, and a server without the route. The batch error
now says the template ID is wrong or batch sends aren't available for
the project, with a fix to send each recipient on its own, and never
suggests updating PostHog. A batch with template_key names only the
batch sends. A 404 whose code is api_error now fails its recipients
too, since PostHog sent none of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 404 to a retry after a lost answer no longer says PostHog sent no
email, since the first try may have queued it. A 404 reads its code
and field the way the error does, so a code that isn't text or a
field that isn't text gets the same advice. A batch with template_key
says sending email from code may be unavailable too, and advises
sending each recipient on its own only where the project can.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants