send() method dispatches a single email through your SES infrastructure. It returns a messageId on success.
Basic usage
Examples
- HTML
- React Email
- With attachments
- Multiple recipients
Parameters
Sender email address. Must be a domain or address verified in SES. Use the format
'[email protected]' or 'Your App <[email protected]>'.Recipient email address or array of addresses.
Email subject line.
HTML body content. Provide
html, text, or react — at least one is required.Plain text body content. Recommended alongside
html for email clients that do not render HTML.A React Email component. The SDK renders it to HTML before sending. Requires
react and @react-email/render to be installed in your project.File attachments to include.
Reply-to email address. Defaults to the
from address if not set.CC recipient email address or array of addresses.
BCC recipient email address or array of addresses.
Return value
send() returns a promise that resolves to:
The SES message ID assigned to the sent email. Use this for tracking and debugging.
Notes
The
from address must belong to a domain verified in SES. Run wraps email domains verify -d yourdomain.com to check verification status.If your SES account is in sandbox mode, you can only send to verified email addresses. Request production access in the AWS console to send to any recipient.
