Send emails at a specific time without additional complexity.
While some emails need to be delivered as soon as possible, like password resets or magic links, others can be scheduled for a specific time.Here are some examples of when you might want to schedule an email:
Send welcome email 5 minutes after signup
Trigger a reminder email 24 hours before an event
Schedule a weekly digest email for the next day at 9am PST
Before, you had to use external services to handle the scheduling logic, but now you can use the new Resend API to schedule emails.
You can use the various Resend SDKs to schedule emails.The date can be defined using natural language, such as "in 1 hour", "tomorrow at 9am", or "Friday at 3pm ET".
Copy
Ask AI
import { Resend } from 'resend';const resend = new Resend('re_xxxxxxxxx');await resend.emails.send({ from: 'Acme <[email protected]>', to: ['[email protected]'], subject: 'hello world', html: '<p>it works!</p>', scheduledAt: 'in 1 min',});
Scheduled emails may fail to send for several reasons. When this happens, you’ll see a failure notification in the email details screen with specific information about why the email couldn’t be sent.Common failure reasons include:
API key is no longer active - The API key used to schedule the email has been deleted, expired, or suspended. The email cannot be sent.
Account under review - Your account has been flagged for review and sending has been temporarily suspended. Contact [email protected] if you believe this is an error.
You can view the failure reason and details in the Resend dashboard by clicking on the failed email.