Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(email) allow for custom mail implementations #10376

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/core/src/providers/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export interface EmailConfig extends CommonProviderOptions {
id: string
type: EmailProviderType
name: string
from: string
maxAge: number
from?: string
maxAge?: number
sendVerificationRequest: (params: {
identifier: string
url: string
Expand All @@ -49,7 +49,7 @@ export interface EmailConfig extends CommonProviderOptions {
server?: NodemailerConfig["server"]
generateVerificationToken?: () => Awaitable<string>
normalizeIdentifier?: (identifier: string) => string
options: EmailUserConfig
options?: EmailUserConfig
}

export type EmailUserConfig = Omit<Partial<EmailConfig>, "options" | "type">
6 changes: 3 additions & 3 deletions packages/core/src/providers/nodemailer.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { createTransport } from "nodemailer"
import { html, text } from "../lib/utils/email.js"
import { AuthError } from "../errors.js"
import { html, text } from "../lib/utils/email.js"

import type { Transport, TransportOptions } from "nodemailer"
import * as JSONTransport from "nodemailer/lib/json-transport/index.js"
import * as SendmailTransport from "nodemailer/lib/sendmail-transport/index.js"
import * as SESTransport from "nodemailer/lib/ses-transport/index.js"
import * as SMTPTransport from "nodemailer/lib/smtp-transport/index.js"
import * as SMTPPool from "nodemailer/lib/smtp-pool/index.js"
import * as SMTPTransport from "nodemailer/lib/smtp-transport/index.js"
import * as StreamTransport from "nodemailer/lib/stream-transport/index.js"
import type { Awaitable, Theme } from "../types.js"
import type { EmailConfig } from "./email.js"
Expand Down Expand Up @@ -40,7 +40,7 @@ export interface NodemailerConfig extends EmailConfig {
theme: Theme
request: Request
}) => Awaitable<void>
options: NodemailerUserConfig
options?: NodemailerUserConfig
}

export type NodemailerUserConfig = Omit<
Expand Down
Loading