diff --git a/helpers/mail.js b/helpers/mail.js index 88d98a2..c34b931 100644 --- a/helpers/mail.js +++ b/helpers/mail.js @@ -30,6 +30,14 @@ async function sendMail(data) { } } +function getReceivedBookingText(booking) { + return `Hallo lieber Admin, + + es ging folgende Buchung ein: https://${process.env.VERCEL_URL}/booking/${booking.uuid} + + MfG` +} + export async function sendReceivedBookingMail(booking) { const data = { personalizations: [ @@ -39,9 +47,7 @@ export async function sendReceivedBookingMail(booking) { ], from: { email: FROM_EMAIL }, subject: 'Pfadi Bussle - Buchung eingegangen!', - content: [ - { type: 'text/plain', value: `${JSON.stringify(booking, null, 4)}` }, - ], + content: [{ type: 'text/plain', value: getReceivedBookingText(booking) }], } await sendMail(data)