Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(email): send email with react component will now render text if text is undefined #469

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

sommeeeer
Copy link

@sommeeeer sommeeeer commented Feb 22, 2025

Closes #451 and #369

When you pass a React component to either resend.emails.send() or resend.batch.send() we want it to automatically send the text version if text is undefined. This PR solves that.

const email = await resend.emails.send({
    from: 'test <[email protected]>',
    to: '[email protected]',
    subject: 'hey',
    react: <Email url="https://example.com" />,
    // text: will be automatically rendered here
  });

@sommeeeer sommeeeer requested a review from a team as a code owner February 22, 2025 20:15
@sommeeeer sommeeeer force-pushed the plain-text-with-react branch from 145fdc9 to 57ceabd Compare February 22, 2025 21:13
@sommeeeer sommeeeer force-pushed the plain-text-with-react branch from b86b5d2 to f226297 Compare February 22, 2025 21:26
@sommeeeer sommeeeer changed the title feature(email): send email with react component will now render text aswell feature(email): send email with react component will now render text if text is undefined Feb 22, 2025
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.

Feature suggestion: Send plain text by default when react email component is provided
1 participant