Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions contents/docs/workflows/transactional-emails/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ $result = PostHog::emails()->send([

### Copies and attachments

<CalloutBox icon="IconWarning" title="Attachments are temporarily unavailable" type="warning">

A send with `attachments` gets a `400` error with the code `invalid_request`, and `attr` is `attachments`. PostHog sends nothing. Leave out `attachments` to send the email. `cc` and `bcc` work as described below.

</CalloutBox>

Content from your code also takes these fields. A template send takes none of them, because the template uses its own settings.

| Field | Required | Description |
Expand Down
6 changes: 6 additions & 0 deletions contents/docs/workflows/transactional-emails/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ Without a distinct ID, PostHog records the email on a person whose distinct ID i

## Receipt with a PDF

<CalloutBox icon="IconWarning" title="Attachments are temporarily unavailable" type="warning">

This example gets a `400` error while attachments are unavailable. To send the receipt now, leave out `attachments`. The `cc` copy still works.

</CalloutBox>

Send a receipt with the invoice attached, and a copy to the customer's billing contact. Attachments and copies work only with [content from your code](/docs/workflows/transactional-emails#choose-where-the-emails-content-lives), so your code renders the email. The SDKs don't send copies and attachments yet, so this example uses the API.

| Setting | Value |
Expand Down
2 changes: 1 addition & 1 deletion contents/docs/workflows/transactional-emails/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ You can write the email in PostHog, or send content that your code renders. Both
| Who edits it | Anyone on your team, in the PostHog editor, with no deploy | Engineers, in your codebase |
| Best for | Copy that changes often, and teams that want drafts, versions, and a preview | [React Email](https://react.email) or other templates that you already have, and a move from another email provider |
| What a send carries | `template_id` and the template's variables | `template_key`, `subject`, and `html` or `text` |
| Copies and attachments | Not on the send | `cc`, `bcc`, and `attachments`, on the API |
| Copies and attachments | Not on the send | `cc` and `bcc`, on the API. Attachments are [temporarily unavailable](/docs/workflows/transactional-emails/api#copies-and-attachments). |

The rest of this page covers emails that you write in PostHog. For content from your code, see your SDK's page or [the API](/docs/workflows/transactional-emails/api#send-content-from-your-code).

Expand Down
Loading