Skip to content

feat: add Lettermint integration#3033

Open
Glennmen wants to merge 3 commits intoresend:canaryfrom
Glennmen:lettermint
Open

feat: add Lettermint integration#3033
Glennmen wants to merge 3 commits intoresend:canaryfrom
Glennmen:lettermint

Conversation

@Glennmen
Copy link

@Glennmen Glennmen commented Mar 10, 2026

Add docs and example for sending emails with the Lettermint Node.js SDK.


Summary by cubic

Add Lettermint integration with docs and a runnable example for sending emails using React Email and the lettermint SDK.

  • New Features
    • Added Lettermint docs (install, template, send) and Integrations sidebar entry.
    • New examples/lettermint to render and send an email; set LETTERMINT_API_TOKEN to run.
    • Example and docs use the options-object Lettermint constructor with apiToken for clarity.

Written for commit 292a95b. Summary will update on new commits.

Add docs and example for sending emails with the Lettermint Node.js SDK.
@changeset-bot
Copy link

changeset-bot bot commented Mar 10, 2026

⚠️ No Changeset found

Latest commit: 292a95b

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

@vercel
Copy link

vercel bot commented Mar 10, 2026

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

A member of the Team first needs to authorize it.

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.

2 issues found across 6 files

Confidence score: 3/5

  • There is a concrete medium-to-high risk around the new Lettermint send flow: both examples/lettermint/src/index.tsx and apps/docs/integrations/lettermint.mdx omit an explicit production API token scope/permission check reminder, which can lead to failed sends or misconfigured deployments.
  • Because these findings are severity 7/10 with high confidence (9–10/10), this is more than a minor housekeeping issue and introduces user-facing integration risk if merged as-is.
  • Pay close attention to examples/lettermint/src/index.tsx, apps/docs/integrations/lettermint.mdx - ensure production LETTERMINT_API_TOKEN permission/scope verification is clearly enforced or documented before send usage.
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="examples/lettermint/src/index.tsx">

<violation number="1" location="examples/lettermint/src/index.tsx:9">
P1: Custom agent: **API Key Permission Check SDK Methods**

This PR adds Lettermint’s email send SDK method without an explicit permission/scope confirmation for production API keys. Add a clear confirmation step (or enforceable check/documented note) that the production token can perform `email.send` to prevent 403/permission failures after deploy.</violation>
</file>

<file name="apps/docs/integrations/lettermint.mdx">

<violation number="1" location="apps/docs/integrations/lettermint.mdx:60">
P1: Custom agent: **API Key Permission Check SDK Methods**

This new Lettermint send flow should explicitly remind users to verify their production `LETTERMINT_API_TOKEN` has email-sending permissions/scopes before using `.send()`, otherwise deployments can fail with permission errors.</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.


const emailHtml = await render(<Email url="https://example.com" />);

await lettermint.email
Copy link
Contributor

Choose a reason for hiding this comment

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

P1: Custom agent: API Key Permission Check SDK Methods

This PR adds Lettermint’s email send SDK method without an explicit permission/scope confirmation for production API keys. Add a clear confirmation step (or enforceable check/documented note) that the production token can perform email.send to prevent 403/permission failures after deploy.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/lettermint/src/index.tsx, line 9:

<comment>This PR adds Lettermint’s email send SDK method without an explicit permission/scope confirmation for production API keys. Add a clear confirmation step (or enforceable check/documented note) that the production token can perform `email.send` to prevent 403/permission failures after deploy.</comment>

<file context>
@@ -0,0 +1,14 @@
+
+const emailHtml = await render(<Email url="https://example.com" />);
+
+await lettermint.email
+  .from('you@example.com')
+  .to('user@gmail.com')
</file context>

import { Lettermint } from "lettermint";
import { Email } from "./email";

const lettermint = new Lettermint({ apiToken: process.env.LETTERMINT_API_TOKEN });
Copy link
Contributor

Choose a reason for hiding this comment

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

P1: Custom agent: API Key Permission Check SDK Methods

This new Lettermint send flow should explicitly remind users to verify their production LETTERMINT_API_TOKEN has email-sending permissions/scopes before using .send(), otherwise deployments can fail with permission errors.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/docs/integrations/lettermint.mdx, line 60:

<comment>This new Lettermint send flow should explicitly remind users to verify their production `LETTERMINT_API_TOKEN` has email-sending permissions/scopes before using `.send()`, otherwise deployments can fail with permission errors.</comment>

<file context>
@@ -0,0 +1,81 @@
+import { Lettermint } from "lettermint";
+import { Email } from "./email";
+
+const lettermint = new Lettermint({ apiToken: process.env.LETTERMINT_API_TOKEN });
+
+const emailHtml = await render(<Email url="https://example.com" />);
</file context>

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