Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🪵 Log error message from failed email (#693)

Luke Vella43757becc644
diff --git a/packages/emails/src/send-email.tsx b/packages/emails/src/send-email.tsx
index a0a95ef36..2bf459bf1 100644
--- a/packages/emails/src/send-email.tsx
+++ b/packages/emails/src/send-email.tsx
@@ -81,7 +81,6 @@ type SendEmailOptions<T extends TemplateName> = {
to: string;
subject: string;
props: TemplateProps<T>;
- onError?: () => void;
};
export const sendEmail = async <T extends TemplateName>(
@@ -107,10 +106,8 @@ export const sendEmail = async <T extends TemplateName>(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
html,
});
- return;
} catch (e) {
console.error("Error sending email", templateName, e);
- options.onError?.();
}
};
@@ -120,6 +117,6 @@ export const sendRawEmail = async (options: Mail.Options) => {
await transport.sendMail(options);
return;
} catch (e) {
- console.error("Error sending email");
+ console.error("Error sending email", e);
}
};