English
Learn how to use SendGrid for sending emails.
Create a SendGrid account
Add environment variables
SENDGIRD_TOKEN
export * from './providers/sendgrid';
Sending Emails
import { sendgridClient } from '@repo/email'; import { ContactTemplate } from '@repo/email/emails/contact'; import { render } from "@react-email/components"; const emailHtml = await render(<ContactTemplate name={name} email={email} message={message} />); await sendgridClient.send({ from: 'sender@acme.com', to: 'recipient@acme.com', subject: 'The email subject', react: emailHtml, });