Installation
Set up your API key
Get your API key from MailerSend and add it to your environment variables:
Usage
Create an email component
emails/email.tsx
Send the email
index.tsx
Advanced features
Multiple recipients
CC and BCC
Plain text version
Reply-to address
Attachments
Tags and personalization
Template variables
If you want to use MailerSend’s template system instead of React Email:Error handling
Important notes
- Domain verification: Verify your sending domain in the MailerSend dashboard
- Object-based API: MailerSend uses classes like
Sender,Recipient, andEmailParams - Analytics: MailerSend provides detailed analytics on email delivery and engagement
- Template system: You can use MailerSend templates or React Email components