mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-22 20:16:57 +00:00
Send mails to console when no server specified
This commit is contained in:
@@ -121,9 +121,6 @@ export type NodemailerUserConfig = Omit<
|
||||
export default function Nodemailer(
|
||||
config: NodemailerUserConfig,
|
||||
): NodemailerConfig {
|
||||
if (!config.server)
|
||||
throw new AuthError("Nodemailer requires a `server` configuration");
|
||||
|
||||
return {
|
||||
id: "nodemailer",
|
||||
type: "email",
|
||||
@@ -150,6 +147,13 @@ export default function Nodemailer(
|
||||
console.log("Connection URL", url);
|
||||
|
||||
const { host } = new URL(url);
|
||||
|
||||
console.log(config);
|
||||
if (!(config.server as unknown as any)?.host) {
|
||||
console.log(text({ url, host, t }));
|
||||
return;
|
||||
}
|
||||
|
||||
const transport = createTransport(provider.server);
|
||||
const result = await transport.sendMail({
|
||||
to: identifier,
|
||||
|
||||
Reference in New Issue
Block a user