Skip to content

docs(workflows): send transactional emails from Go, .NET, Rust, Ruby, Elixir and PHP - #21932

Open
Silthus wants to merge 13 commits into
docs/transactional-email-api-code-formfrom
docs/transactional-email-all-sdks
Open

Silthus wants to merge 13 commits into
docs/transactional-email-api-code-formfrom
docs/transactional-email-all-sdks

Conversation

@Silthus

@Silthus Silthus commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Before this PR, the transactional email docs covered only Node.js, Python, and the raw API. A reader saw many reference sections before they could send one email. This PR adds a page for each of the other six SDKs and rewrites the existing pages so that a reader sends a first email in a few minutes.

New pages

  • Go, .NET, Rust, Ruby, Elixir, and PHP: one page for each SDK, in the same form as the Node.js page.
  • Examples: sign-in code, email address check, team invite, a receipt with a PDF attached, and a funnel that measures whether an email works.

Every SDK page (all eight)

  • Prompt for your coding agent: a prompt to paste into Claude Code, Cursor, or another agent. It sends the agent to the page's Markdown copy and states the rules that are easy to get wrong.
  • Set up the client, Send an email, Link emails to your users, Send content from your code, Copies and attachments, and Check an email's status.
  • Send from a background job: a real queue for each language, with retries only for the errors that a later attempt can fix, and all retries finished within the 24 hours that PostHog keeps an idempotency key. Node.js uses BullMQ, Python uses Celery, Ruby uses Sidekiq, Go uses River, .NET uses Hangfire, PHP uses Laravel queues, and Elixir uses Oban. Rust shows a sketch without a queue library.
  • Test without sending email: a test that records the request with no network call, for every SDK that lets you replace its HTTP client. PHP has no such hook, so its page has no test section.
  • Use a proxy or self-hosted PostHog.

Overview page

  • Send your first email: a quick start in four steps: create the email, create an API key, send the email to yourself with cURL, and see it arrive.
  • Choose where the email's content lives: a template made in PostHog, or content from your code.
  • A table of idempotency keys for common emails, a "Retry?" column in the errors table, and a new Troubleshoot an email that didn't arrive section.

Other changes

  • API page: a new intro that points to the SDKs and the quick start, and a language tab for cURL and all eight SDKs on each example.
  • Sidebar: six SDK entries between Python and API, and an Examples entry after API.

The API shapes come from the SDK PRs: posthog-go #406, posthog-dotnet #365, posthog-rs #324, posthog-ruby #324, posthog-elixir #236, and posthog-php #288. Copies and attachments come from posthog-js #5514, posthog-python #1172, posthog-go #408, posthog-dotnet #367, posthog-rs #326, posthog-ruby #325, posthog-php #292, and posthog-elixir #239.

Stacked on #21819. This PR also rewrites the four pages of #21819: the overview, API, Node.js, and Python pages. It keeps the API page's note that a 404 right after a send means "retry after a short wait", and Python 7.84.0 for content from code.

Note

🔵 Merge risk: low · two-way door

Warning

The pages name these versions, which are now published: posthog-node 5.61.2 for templates and 5.62.0 for content from code (5.62.0 is still publishing), posthog (Python) 7.81.2 and 7.84.0, posthog-go 1.40.0, PostHog .NET 2.20.0, posthog-rs 0.31.0, posthog-ruby 3.30.0, posthog (Elixir) 2.20.0, and posthog-php 4.22.0.

The copies and attachments PRs are still open in every SDK, so no published version has these fields yet. When an SDK releases them in a later version than its email support, name that version in its copies and attachments section.

Right before the merge, check every "from version" line on all eight SDK pages against npm, PyPI, the Go module proxy, NuGet, crates.io, RubyGems, Hex, and Packagist.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build (I checked them on a local dev server instead, see Evidence)
  • If I moved a page, I added a redirect in vercel.json (no page moved)

Evidence

I ran the dev server (pnpm start) on the branch and rendered each changed page with Playwright: the overview, Examples, Node.js, and Python pages at 2448c60, and the other pages at 727ba84, which changed only in text since then. I captured them at 1440 px and 640 px wide, in light and dark mode. The "before" captures come from the same server with the base branch's src/navs/index.js.

Important

Gap: the captures below come from 8cfab85 and earlier, so the "after" sidebar doesn't show the Examples entry yet. New captures of the head are ready: the sidebar with Examples, the quick start, the Examples page, and the new Node.js and Python sections. I can't upload them, because my account lost push access to PostHog/pr-assets. I'll add them when the access is back.

Sidebar

Before After
Wide, light before, wide, light after, wide, light
Wide, dark before, wide, dark after, wide, dark
Narrow, light before, narrow, light after, narrow, light
Narrow, dark before, narrow, dark after, narrow, dark
Narrow, light, sidebar open before, sidebar open, light after, sidebar open, light
Narrow, dark, sidebar open before, sidebar open, dark after, sidebar open, dark

API page language tabs

Light Dark
Wide Wide light, API tabs Wide dark, API tabs
Narrow Narrow light, API tabs Narrow dark, API tabs
Copies and attachments copies and attachments, wide light copies and attachments, narrow dark

Checks

  • pnpm format ran on the changed files. Prettier skips .mdx, so I checked the code blocks by hand.
  • Each changed page loads with no new console errors. The 404 for a missing asset, the SVG width warning, and validateDOMNesting also show on pages that this PR doesn't change. The .NET and Python pages show a React duplicate-key warning for their two tabs in the same language, and the tabs switch correctly.
  • The Ruby WebMock test ran in a container and passed.
  • No page moved, so pnpm test-redirects does not apply. I didn't run a full site build, so the Markdown copy of each page (the .md URL that the agent prompts name) isn't checked locally. The Vercel preview builds it.
  • A cross-model review panel ran four rounds and six final reads. Each API claim was checked against the SDK PR heads.

Calls made

  • One rewrite in this PR. The rewrite of the four docs(workflows): send content from your code on the transactional email API, Node.js and Python pages #21819 pages is in this PR, not in a new one, so the docs land in one form on the first merge.
  • Agent prompts point to the Markdown copy. Each prompt sends the agent to the page's .md URL, so the agent reads the current docs, not what it remembers.
  • Ruby uses a global client. The helpers call $posthog.emails, so the setup snippet and the helpers work together when you paste them. A Rails app can use an initializer constant in its place.
  • Queue retries use each queue's backoff, not Retry-After. Each backoff runs past the per-minute rate limit. To read Retry-After, each example needs code for its queue's scheduling API.
  • No coming-soon notes. Every SDK has an open PR for copies and attachments, so the pages show them as available. The warning above holds the merge until they ship.

Follow-ups

  • Code tab labels stop at the first space. For example, file=Swift Package Manager on the React Native source maps page renders as "Swift". That is why the .NET tab says "ASP.NET". It needs a site issue, not a fix in this PR.
  • A test inbox, an address that accepts a send and delivers nothing, would let readers test without a real mailbox. That is a product idea, not a docs change.

🤖 Generated with Claude Code

… Elixir and PHP

Add a page for each SDK with the template send, content from code, the
status read, and the distinct ID guidance. Copies and attachments are
marked as coming in a later version. The API page shows every SDK in its
language tabs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the docs Improvements or additions to product documentation, "Docs" label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Nov 05, 2026 01:52PM

Changed pages

Page Source
Send transactional emails contents/docs/workflows/transactional-emails/index.mdx
Send transactional emails with the API contents/docs/workflows/transactional-emails/api.mdx
Send transactional emails with .NET contents/docs/workflows/transactional-emails/dotnet.mdx
Send transactional emails with Elixir contents/docs/workflows/transactional-emails/elixir.mdx
Transactional email examples contents/docs/workflows/transactional-emails/examples.mdx
Send transactional emails with Go contents/docs/workflows/transactional-emails/go.mdx
Send transactional emails with Node.js contents/docs/workflows/transactional-emails/node.mdx
Send transactional emails with PHP contents/docs/workflows/transactional-emails/php.mdx
Send transactional emails with Python contents/docs/workflows/transactional-emails/python.mdx
Send transactional emails with Ruby contents/docs/workflows/transactional-emails/ruby.mdx
Send transactional emails with Rust contents/docs/workflows/transactional-emails/rust.mdx

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Vale prose linter → found 81 errors, 24 warnings, 3 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/workflows/transactional-emails/api.mdx — 8 errors, 0 warnings, 0 suggestions
Line Severity Message Rule
17:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
18:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
181:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
182:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
334:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
335:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
336:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
337:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/dotnet.mdx — 5 errors, 3 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
79:94 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
127:20 warning 'Hangfire' is a possible misspelling. PostHogBase.Spelling
184:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
185:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
208:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
210:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
211:26 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/elixir.mdx — 5 errors, 5 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
59:66 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
106:20 warning 'Oban' is a possible misspelling. PostHogBase.Spelling
167:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
168:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
172:336 warning 'EEx' is a possible misspelling. PostHogBase.Spelling
191:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
193:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
194:27 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
242:32 warning 'config's' is a possible misspelling. PostHogBase.Spelling
contents/docs/workflows/transactional-emails/examples.mdx — 0 errors, 1 warnings, 3 suggestions
Line Severity Message Rule
19:17 suggestion Address the reader directly. Use 'you' instead of 'The user'. PostHogDocs.DirectAddress
66:76 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
105:37 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
156:4 warning 'Receipt with a PDF' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
contents/docs/workflows/transactional-emails/go.mdx — 5 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
61:199 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
164:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
165:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
189:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
191:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
192:26 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/index.mdx — 27 errors, 0 warnings, 0 suggestions
Line Severity Message Rule
113:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
114:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
115:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
116:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
133:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
134:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
135:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
156:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
157:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
158:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
159:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
160:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
186:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
187:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
188:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
189:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
253:42 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
254:74 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
255:42 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
256:39 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
257:35 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
281:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
282:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
283:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
284:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
285:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
286:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/node.mdx — 7 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
54:72 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
146:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
147:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
177:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
179:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
180:26 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
188:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
189:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/php.mdx — 5 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
59:67 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
164:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
165:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
187:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
189:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
190:27 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/python.mdx — 7 errors, 3 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
73:89 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
168:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
169:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
207:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
209:14 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
210:27 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
218:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
219:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
219:33 warning 'dicts' is a possible misspelling. PostHogBase.Spelling
contents/docs/workflows/transactional-emails/ruby.mdx — 7 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
55:215 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
130:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
131:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
152:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
154:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
155:27 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
163:21 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
164:20 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/workflows/transactional-emails/rust.mdx — 5 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning Avoid trivializing words. 'easy to' can sound dismissive to the reader. PostHogDocs.Trivializers
153:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
154:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
158:420 warning 'Askama' is a possible misspelling. PostHogBase.Spelling
158:430 warning 'Tera' is a possible misspelling. PostHogBase.Spelling
183:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
185:13 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
186:27 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
236:33 warning 'httpmock' is a possible misspelling. PostHogBase.Spelling

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review · Standard · reviewed 3afd19a: 4 Should fix.

This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.

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.

```

- **Local evaluation:** When `SecretKey` is set, the client also polls flag definitions with it for [local evaluation](/docs/feature-flags/local-evaluation). Give the key the **Feature flag** read scope too, or the client logs a failed poll each time it polls.
- **Host:** On PostHog Cloud, the client sends email to the app host of your region, even when `Endpoint` is an ingestion host such as `us.i.posthog.com`. For any other host, such as a reverse proxy or a self-hosted instance, set `AppHost` to your PostHog app URL. The client refuses to send the secret key to a host that might be a proxy.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 · Limit the proxy safety claim to email requests

When an existing client uses an ingestion proxy, adding SecretKey starts flag-definition requests against Endpoint, including the secret. AppHost only reroutes email requests, so the stated refusal does not protect the key from that proxy. The Ruby, PHP, and Elixir notes repeat this claim; document the flag-request exposure and a safe configuration.

Comment on lines +37 to +39
def send_password_reset(user, reset_link, reset_request_id)
# Raises PostHog::EmailError when PostHog doesn't queue the email. Branch on error.code.
result = posthog.emails.send(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 · Pass the Ruby client into the helper methods

When readers call this helper after the setup example, posthog raises NameError: Ruby methods declared with def do not capture the surrounding local variables. Both send helpers and email_bounced? therefore fail before making an SDK request. Pass the initialized client into each helper, or store it in an instance variable accessible to those methods.

Comment on lines +43 to +44
func sendPasswordReset(ctx context.Context, userID, email, firstName, resetLink, resetRequestID string) (string, error) {
result, err := client.Emails().Send(ctx, posthog.TemplateEmail{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 · Pass the Go client into the helper functions

When readers combine this helper with the setup example, compilation fails with undefined: client. The setup creates client with :=, which requires function scope, while these package-level functions cannot capture that local variable. Both send examples and emailBounced have this problem; pass a posthog.Client parameter into each helper.

Comment on lines +137 to +139
if errors.As(err, &emailErr) && emailErr.Code == "not_found" {
// The first status can take a few seconds to arrive. Try again later.
return false, nil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 · Preserve the unavailable status so callers can retry

When a status lookup returns not_found before the first status arrives, emailBounced returns false, nil, exactly as for a successful lookup of a non-bounced email. Callers cannot detect this transient failure and trigger the retry recommended below the example. Return an explicit unknown result, propagate the error, or perform bounded retries inside the helper.

Silthus and others added 2 commits November 4, 2026 07:39
Use the placeholders the site fills in, pass the client to the Go and Ruby
helpers, tell "not yet" from "not bounced" in Go, add the .NET usings
and serde_json, and say that flag definitions still load from the
ingestion host with the secret key. Ruby's timeout covers each connect,
read, and write.

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

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

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

10.27 MiB (-1480.3 KiB / -12.3%)

Largest changed named chunks
Chunk Gzip Δ vs master
app.js 2361.2 KiB +1270.1 KiB / +116.4%
23b110d95c587435d17e5a559280a7b225e5608c.js 110.1 KiB new
655c369601e38a7136cffdc999798d51fd71fc19.js 50.7 KiB new
4e5c9a1d4810c5f5c6325835bcfd7f436eb1af7e.js 9.3 KiB -33.4 KiB / -78.2%
d874fb577ecb130d9c247b410613f0930a236c94.js 20.0 KiB new
af98e9f54e85b4e4080569f09ec6b2f06c3d7b85.js 15.0 KiB new
component---src-pages-careers-tsx.js 54.5 KiB -10.9 KiB / -16.6%
component---src-pages-r-product-analytics-tsx.js 6.7 KiB -9.4 KiB / -58.3%
component---src-pages-r-posthog-mcp-tsx.js 4.3 KiB -9.3 KiB / -68.2%
component---src-pages-merch-tsx.js 22.0 KiB -8.8 KiB / -28.5%
component---src-pages-docs-about-tsx.js 0.8 KiB -7.4 KiB / -90.5%
component---src-pages-self-driving-index-tsx.js 9.2 KiB -7.3 KiB / -44.1%
component---src-pages-changelog-index-tsx.js 0.1 KiB -6.1 KiB / -97.8%
component---src-pages-teams-[slug]-tsx.js 8.9 KiB -6.1 KiB / -40.5%
component---src-pages-hog-index-tsx.js 0.5 KiB -5.6 KiB / -91.9%

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
✅ app 20.92 MiB (+11247.2 KiB / +110.5%) report-only 2119
Largest modules in the app closure
Module Size
./src/data/mcp-tools.json 1491.9 KiB
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 838.0 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/x-ray.mjs 481.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/trenchcoat.mjs 450.8 KiB
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules 395.1 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/im-the-driver.mjs 385.8 KiB
./src/hooks/useCustomers.tsx + 61 modules 381.8 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/tourist.mjs 364.6 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./src/components/ProductComparisonTable/index.tsx + 130 modules 314.3 KiB
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 126 modules 287.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/doll-house.mjs 284.1 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

Silthus and others added 4 commits November 4, 2026 08:34
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…email-all-sdks

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Silthus
Silthus marked this pull request as ready for review November 5, 2026 08:42
@Silthus Silthus added the stamphog Request AI approval (no full review) label Nov 5, 2026
Silthus and others added 3 commits November 5, 2026 08:50
…email-all-sdks

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus and others added 3 commits November 5, 2026 12:45
…send

Add a quick start that sends a first email with curl, a table to choose
where the content lives, a coding agent prompt on each SDK page, a retry
column in the errors table, and a checklist for an email that didn't
arrive. Each SDK page now shows a send from a background job, a test
that fakes HTTP, and its proxy notes at the end. A new examples page
covers sign-in codes, email address checks, invites, receipts with a
PDF, and a funnel that measures an email. PHP names 4.22.0 and Elixir
2.20.0, the versions their releases now publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PostHog remembers an idempotency key for 24 hours, so a job retried
after that can send the email twice. Each background-job example now
says to finish its retries within 24 hours. The Sidekiq job retries 5
times, the River job has 5 attempts, and the BullMQ job shows its
attempts and backoff. The quick start turns on Protect sensitive data
for its reset email.

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

The Node.js and Python pages now document cc, bcc, and attachments, as
the other six SDK pages do, and the receipt example shows Node.js and
Python. Five pages said that the client never sends the secret key to a
proxy, but local evaluation does. They now say that the client never
sends email requests there. The Celery retries now wait long enough to
pass a rate limit, and the quick start sets the key before it sends.

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

docs Improvements or additions to product documentation, "Docs" stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants