This commit is contained in:
David Nguyen
2025-02-11 02:04:00 +11:00
parent d24f67d922
commit 548d92c2fc
22 changed files with 1260 additions and 1152 deletions

View File

@ -2,8 +2,8 @@ import type { Transporter } from 'nodemailer';
import { createTransport } from 'nodemailer';
import { env } from '@documenso/lib/utils/env';
import { ResendTransport } from '@documenso/nodemailer-resend';
// import { ResendTransport } from '@documenso/nodemailer-resend';
import { MailChannelsTransport } from './transports/mailchannels';
/**
@ -63,14 +63,13 @@ const getTransport = (): Transporter => {
);
}
// Todo
// if (transport === 'resend') {
// return createTransport(
// ResendTransport.makeTransport({
// apiKey: env('NEXT_PRIVATE_RESEND_API_KEY') || '',
// }),
// );
// }
if (transport === 'resend') {
return createTransport(
ResendTransport.makeTransport({
apiKey: env('NEXT_PRIVATE_RESEND_API_KEY') || '',
}),
);
}
if (transport === 'smtp-api') {
if (!env('NEXT_PRIVATE_SMTP_HOST') || !env('NEXT_PRIVATE_SMTP_APIKEY')) {