{"id":51100746,"url":"https://github.com/primitivedotdev/send-email","last_synced_at":"2026-06-24T10:30:31.578Z","repository":{"id":362776846,"uuid":"1260617193","full_name":"primitivedotdev/send-email","owner":"primitivedotdev","description":"Send email via primitive.dev from a GitHub Actions workflow","archived":false,"fork":false,"pushed_at":"2026-06-05T20:36:09.000Z","size":622,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T22:16:10.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://primitive.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/primitivedotdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-05T17:27:38.000Z","updated_at":"2026-06-05T20:36:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/primitivedotdev/send-email","commit_stats":null,"previous_names":["primitivedotdev/send-email"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/primitivedotdev/send-email","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsend-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsend-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsend-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsend-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primitivedotdev","download_url":"https://codeload.github.com/primitivedotdev/send-email/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primitivedotdev%2Fsend-email/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34726584,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-24T10:30:30.856Z","updated_at":"2026-06-24T10:30:31.573Z","avatar_url":"https://github.com/primitivedotdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Send Email\n\nGitHub Action that sends an email from CI via [primitive.dev](https://primitive.dev)'s `/v1/send-mail` API. Useful for pipeline notifications, release announcements, and alerts. The step **fails** if the recipient is rejected, so a red run means the mail didn't go out.\n\n## Quick start\n\n```yaml\n- uses: primitivedotdev/send-email@v0\n  with:\n    api-key: ${{ secrets.PRIMITIVE_API_KEY }}\n    from: ci@yourdomain.com\n    to: you@example.com\n    subject: \"Deploy ${{ github.ref_name }} succeeded\"\n    body-text: ${{ github.event.head_commit.message }}\n```\n\n`from` must be on a verified sending domain owned by the API key's org.\n\n## Inputs\n\n| Input | Required | Default | Description |\n|---|---|---|---|\n| `api-key` | yes | — | Org-scoped Primitive API key. Pass via `${{ secrets.* }}` — masked in logs. |\n| `api-base-url` | no | `https://api.primitive.dev/v1` | API base URL. Override only for a non-production environment. |\n| `from` | yes | — | Sender address on a verified sending domain owned by the key's org. |\n| `to` | yes | — | Recipient address. |\n| `subject` | yes | — | Email subject. |\n| `body-text` | one of | — | Plain-text body. At least one of `body-text` / `body-html` is required. |\n| `body-html` | one of | — | HTML body. At least one of `body-text` / `body-html` is required. |\n| `wait` | no | `false` | Block until the platform reports a delivery outcome (up to `wait-timeout-ms`) instead of returning when the send is accepted. |\n| `wait-timeout-ms` | no | `10000` | Max ms to wait for delivery when `wait` is true (platform caps at 30000). |\n| `expected-org-id` | no | — | Safety guard: calls `/whoami` and aborts if the API key's org differs from this UUID. Recommended in production workflows. |\n\nAt least one of `body-text` and `body-html` must be set.\n\n## Outputs\n\n| Output | Description |\n|---|---|\n| `email-id` | UUID of the accepted send. |\n| `status` | Platform-reported status (e.g. `submitted_to_agent`, `delivered`). |\n| `accepted` | Comma-separated accepted recipients. |\n| `rejected` | Comma-separated rejected recipients (empty on success — a non-empty value fails the step). |\n\n## Examples\n\n### Notify on failure\n\n```yaml\n- name: Tests\n  run: pnpm test\n- if: failure()\n  uses: primitivedotdev/send-email@v0\n  with:\n    api-key: ${{ secrets.PRIMITIVE_API_KEY }}\n    from: ci@yourdomain.com\n    to: oncall@yourdomain.com\n    subject: \"❌ ${{ github.workflow }} failed on ${{ github.ref_name }}\"\n    body-text: \"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"\n```\n\n### HTML body + wait for delivery + org guard\n\n```yaml\n- uses: primitivedotdev/send-email@v0\n  with:\n    api-key: ${{ secrets.PRIMITIVE_API_KEY }}\n    expected-org-id: ${{ vars.PRIMITIVE_ORG_ID }}\n    from: releases@yourdomain.com\n    to: team@yourdomain.com\n    subject: \"Release ${{ github.ref_name }}\"\n    body-html: \"\u003ch1\u003eShipped ${{ github.ref_name }}\u003c/h1\u003e\u003cp\u003eSee the changelog.\u003c/p\u003e\"\n    wait: true\n    wait-timeout-ms: 20000\n```\n\n### Using outputs\n\n```yaml\n- id: mail\n  uses: primitivedotdev/send-email@v0\n  with:\n    api-key: ${{ secrets.PRIMITIVE_API_KEY }}\n    from: ci@yourdomain.com\n    to: you@example.com\n    subject: hi\n    body-text: hi\n- run: echo \"sent email-id=${{ steps.mail.outputs.email-id }} status=${{ steps.mail.outputs.status }}\"\n```\n\n## Security\n\n- The `api-key` input is automatically masked. Pass it as a GitHub secret (`${{ secrets.* }}`) — never hard-code.\n- Use `expected-org-id` in production workflows. It calls `GET /v1/whoami` before sending and aborts if the API key's org doesn't match, so a leaked key can't be used to send from an unexpected org.\n\n## Versioning\n\n- Floating major tag `v0` always tracks the latest 0.x.\n- Pin a specific minor/patch (`v0.1.0`) for reproducible runs.\n- Breaking changes bump the major; the old major stays alive for a deprecation window.\n\n## Source\n\nThis action is authored in [primitivedotdev/primitive-mono-repo](https://github.com/primitivedotdev/primitive-mono-repo) under `tools/actions/send-email/` and mirrored here on release tags. See [RELEASING.md](./RELEASING.md) for the release process.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimitivedotdev%2Fsend-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimitivedotdev%2Fsend-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimitivedotdev%2Fsend-email/lists"}