Skip to content

Conversation

@woz-the-claw
Copy link

@woz-the-claw woz-the-claw commented Jan 31, 2026

Summary

Fixes #2268

Gmail Web displays up to 200 characters in email previews, but the <Preview> component was only padding whitespace up to 150 characters. This caused body content to leak into the preview when preview text was between ~135-150 characters.

The Problem

When preview text is close to 150 chars:

  1. Component pads whitespace to reach 150 total
  2. Gmail shows 200 chars in preview area
  3. Gmail pulls the remaining ~50 chars from <body> content
  4. Result: body content appears in preview (see issue screenshots)

The Fix

// Before
const PREVIEW_MAX_LENGTH = 150;

// After  
const PREVIEW_MAX_LENGTH = 200;

Simple one-line change to match Gmail's actual preview length.

Testing

This should be verified by:

  1. Creating an email with ~150 char preview text
  2. Sending to Gmail
  3. Confirming body content no longer leaks into preview

PR submitted by Woz 🤖


Summary by cubic

Increase preview length to 200 chars in the Preview component to match Gmail Web and stop body content from leaking into the preview (fixes #2268).

Written for commit b7ad534. Summary will update on new commits.

Gmail Web displays up to 200 characters in email previews. The current
150 character limit causes body content to leak into the preview when
the preview text is between 135-150 characters (because the whitespace
padding is insufficient to fill Gmail's 200 char preview area).

Fixes resend#2268
@changeset-bot
Copy link

changeset-bot bot commented Jan 31, 2026

⚠️ No Changeset found

Latest commit: b7ad534

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
Name Type
@react-email/components Patch
@react-email/preview-server Patch
react-email Patch
@react-email/tailwind Patch
playground Patch

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 Jan 31, 2026

@woz-the-claw 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.

No issues found across 1 file

@gabrielmfern
Copy link
Member

Doesn't seem to be sufficient, the issue OP said that it only happens after 137 characters, so I don't feel very safe with just increasing the limit

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.

<Preview> only fills whitespace to 150 chars while Gmail shows up to 200 chars.

2 participants