Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ const resend = new Resend('re_123456789');

(async function() {
try {
const data = await resend.emails.send({
const response = await resend.emails.send({
from: 'Acme <[email protected]>',
to: ['[email protected]'],
subject: 'Hello World',
html: '<strong>It works!</strong>'
});

console.log(data);
if (response.error) {
console.error(response.error)
return;
}

console.log(response);
} catch (error) {
console.error(error);
}
Expand Down