This example show how to send Resend emails with unsubscribe URL header.
yarn dev
RESEND_API_KEY=re_8m9gwsVG_6n94KaJkJ42Yj6qSeVvLq9xF
yarn dev
You can update the from
and to
here so send from your own domain and to your email address. The to
must be a verified domain
in your account.
const data = await resend.emails.send({
from: 'Acme <[email protected]>',
to: ['[email protected]'],
subject: 'Waitlist',
html: '<h1>Hi</h1>',
headers: {
'List-Unsubscribe': '<https://example.com/unsubscribe>',
},
});