diff --git a/scripts/send-confirmation-reminder.js b/scripts/send-confirmation-reminder.js index 0365514..4eddfc3 100644 --- a/scripts/send-confirmation-reminder.js +++ b/scripts/send-confirmation-reminder.js @@ -52,11 +52,7 @@ export function createClient({ host, key }) { body: JSON.stringify(convertObjectKeys(config, snakeCase)), }); const data = await res.json(); - const parsed = responseSchema.parse(data); - if (parsed.status === "error") { - throw new PostalError(parsed.data.code, parsed.data.message); - } - return parsed.data; + return data; }, }; } @@ -85,8 +81,8 @@ for (const sub of unconfirmedSubmissions) { const url = new URL(`${sub.language}/confirm/${sub.confirmationToken}`, process.env.PUBLIC_URL); const values = { subject: title, - from: `Let's stop dirty money `, - to: sub.email, + from: `Let's stop dirty money `, + to: [sub.email], htmlBody: ` @@ -147,6 +143,7 @@ for (const sub of unconfirmedSubmissions) { `, }; - console.log("values", values); - // mailClient.send(values + // console.log("values", values); + const result = await mailClient.send(values); + console.log(result); }