feat(integrations): add Mailgun docs and example#3027
feat(integrations): add Mailgun docs and example#3027djbriane wants to merge 6 commits intoresend:canaryfrom
Conversation
|
@djbriane is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
|
There was a problem hiding this comment.
4 issues found across 10 files
Confidence score: 3/5
- There is a concrete user-impacting risk: new
client.messages.createusage inexamples/mailgun/src/index.tsxdoes not surface/guide on API-key permission failures, which can lead to confusing send failures in production. apps/docs/integrations/mailgun.mdxandskills/react-email/references/SENDING.mdboth miss an explicitMAILGUN_API_KEYsend-scope reminder for this SDK method, increasing the chance of misconfigured deployments.- Score is 3 because multiple medium-high severity findings (7/10, high confidence) point to likely integration/regression friction rather than a guaranteed runtime break.
- Pay close attention to
examples/mailgun/src/index.tsx,apps/docs/integrations/mailgun.mdx,skills/react-email/references/SENDING.md- permission-scope checks/reminders and EU-region Mailgun configuration need to be explicit to avoid avoidable send failures.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/docs/integrations/mailgun.mdx">
<violation number="1" location="apps/docs/integrations/mailgun.mdx:60">
P1: Custom agent: **API Key Permission Check SDK Methods**
Add an explicit permission-scope reminder for `MAILGUN_API_KEY` when using `client.messages.create`, so production keys are verified to have send access before deployment.</violation>
</file>
<file name="skills/react-email/references/SENDING.md">
<violation number="1" location="skills/react-email/references/SENDING.md:115">
P1: Custom agent: **API Key Permission Check SDK Methods**
The new Mailgun `messages.create` SDK usage needs an explicit API-key permission check/reminder. Add a guard or note to verify production `MAILGUN_API_KEY` can send messages for the domain before invoking this method.</violation>
</file>
<file name="examples/mailgun/src/index.tsx">
<violation number="1" location="examples/mailgun/src/index.tsx:7">
P2: Mailgun client config is not region-aware; EU accounts require an explicit EU API URL, so this example can fail for EU domains.</violation>
<violation number="2" location="examples/mailgun/src/index.tsx:14">
P1: Custom agent: **API Key Permission Check SDK Methods**
`client.messages.create` introduces a new Mailgun SDK operation, but the new code does not handle/flag permission failures. Per the API Key Permission Check SDK Methods rule, add an explicit 401/403 guard that tells operators to verify the production `MAILGUN_API_KEY` has send permissions for the configured domain.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
In regards to the @cubic-dev-ai feedback, I am recommending we do not implement those changes. I'd be open to adding the region note if maintainers suggest it, but overall the current state feels aligned with how the other provider examples work. |
Summary
Adds Mailgun as a documented integration: docs, runnable example, and homepage integration card.
Changes
apps/docs/integrations/mailgun.mdx– install, render + send with Mailgun, link to exampleexamples/mailgun/– minimal send script usingmailgun.js,render()from@react-email/components, and FormData (aligns with other provider examples)docs.json), integrations snippets, README integrations list, and homepage “Integrate with any service” section (integration.tsx)skills/react-email/references/SENDING.mdunder “Send with Other Providers”Running the example
From
examples/mailgun: install deps, build (pnpm run buildor equivalent), then run withMAILGUN_API_KEYandMAILGUN_DOMAINset. Not in pnpm workspace by design; run from the example directory.Summary by cubic
Add Mailgun integration docs and a runnable example, plus a homepage integration card. This helps users render emails with React Email and send them via Mailgun.
apps/docs/integrations/mailgun.mdxwith install, render, and send steps; links to the example.examples/mailgun/usingmailgun.js,form-data, andrender()from@react-email/components.skills/react-email/references/SENDING.md.Written for commit 6d23ecf. Summary will update on new commits.