17 lines
491 B
JavaScript
17 lines
491 B
JavaScript
import { Resend } from "resend";
|
|
|
|
const key = process.env.COURIER_KEY;
|
|
const baseUrl = process.env.COURIER_BASE_URL;
|
|
if (!key || !baseUrl) {
|
|
console.error("COURIER_KEY und COURIER_BASE_URL setzen");
|
|
process.exit(1);
|
|
}
|
|
const resend = new Resend(key, { baseUrl });
|
|
const { data, error } = await resend.emails.send({
|
|
from: "plan <plan@hubsport.club>",
|
|
to: "test@example.com",
|
|
subject: "Resend-SDK gegen Courier",
|
|
html: "<p>Hallo</p>",
|
|
});
|
|
console.log(error ? { error } : { data });
|