mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26: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(
|
export default function Nodemailer(
|
||||||
config: NodemailerUserConfig,
|
config: NodemailerUserConfig,
|
||||||
): NodemailerConfig {
|
): NodemailerConfig {
|
||||||
if (!config.server)
|
|
||||||
throw new AuthError("Nodemailer requires a `server` configuration");
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: "nodemailer",
|
id: "nodemailer",
|
||||||
type: "email",
|
type: "email",
|
||||||
@@ -150,6 +147,13 @@ export default function Nodemailer(
|
|||||||
console.log("Connection URL", url);
|
console.log("Connection URL", url);
|
||||||
|
|
||||||
const { host } = new 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 transport = createTransport(provider.server);
|
||||||
const result = await transport.sendMail({
|
const result = await transport.sendMail({
|
||||||
to: identifier,
|
to: identifier,
|
||||||
|
|||||||
Reference in New Issue
Block a user