Skip to content

feat(integrations): add Mailgun docs and example#3027

Open
djbriane wants to merge 6 commits intoresend:canaryfrom
djbriane:feat/integrations-mailgun
Open

feat(integrations): add Mailgun docs and example#3027
djbriane wants to merge 6 commits intoresend:canaryfrom
djbriane:feat/integrations-mailgun

Conversation

@djbriane
Copy link

@djbriane djbriane commented Mar 9, 2026

Summary

Adds Mailgun as a documented integration: docs, runnable example, and homepage integration card.

Changes

  • Docs: apps/docs/integrations/mailgun.mdx – install, render + send with Mailgun, link to example
  • Example: examples/mailgun/ – minimal send script using mailgun.js, render() from @react-email/components, and FormData (aligns with other provider examples)
  • Discovery: Mailgun added to docs nav (docs.json), integrations snippets, README integrations list, and homepage “Integrate with any service” section (integration.tsx)
  • Skill: Mailgun block in skills/react-email/references/SENDING.md under “Send with Other Providers”

Running the example

From examples/mailgun: install deps, build (pnpm run build or equivalent), then run with MAILGUN_API_KEY and MAILGUN_DOMAIN set. 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.

  • New Features
    • Docs: apps/docs/integrations/mailgun.mdx with install, render, and send steps; links to the example.
    • Example: examples/mailgun/ using mailgun.js, form-data, and render() from @react-email/components.
    • Discovery: added to docs nav, integrations snippets, README list, and homepage integrations section with logo.
    • Guides: added a Mailgun section to “Send with Other Providers” in skills/react-email/references/SENDING.md.

Written for commit 6d23ecf. Summary will update on new commits.

@vercel
Copy link

vercel bot commented Mar 9, 2026

@djbriane is attempting to deploy a commit to the resend Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link

changeset-bot bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 6d23ecf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 10 files

Confidence score: 3/5

  • There is a concrete user-impacting risk: new client.messages.create usage in examples/mailgun/src/index.tsx does not surface/guide on API-key permission failures, which can lead to confusing send failures in production.
  • apps/docs/integrations/mailgun.mdx and skills/react-email/references/SENDING.md both miss an explicit MAILGUN_API_KEY send-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-ai with guidance or docs links (including llms.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.

@djbriane
Copy link
Author

djbriane commented Mar 9, 2026

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.

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.

1 participant