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')) {

View File

@ -35,11 +35,9 @@
"@react-email/section": "0.0.10",
"@react-email/tailwind": "0.0.9",
"@react-email/text": "0.0.6",
"@lingui/macro": "^5.2.0",
"@lingui/react": "^5.2.0",
"nodemailer": "^6.9.9",
"react-email": "^1.9.5",
"resend": "^2.0.0"
"nodemailer": "6.9.9",
"react-email": "1.9.5",
"resend": "2.0.0"
},
"devDependencies": {
"@documenso/tailwind-config": "*",

View File

@ -1,11 +1,10 @@
import * as ReactEmail from '@react-email/render';
import config from '@documenso/tailwind-config';
import { Tailwind } from './components';
import { BrandingProvider, type BrandingSettings } from './providers/branding';
// Todo:
// import config from '@documenso/tailwind-config';
export type RenderOptions = ReactEmail.Options & {
branding?: BrandingSettings;
};
@ -18,7 +17,7 @@ export const render = (element: React.ReactNode, options?: RenderOptions) => {
config={{
theme: {
extend: {
// colors: config.theme.extend.colors,
colors: config.theme.extend.colors,
},
},
}}
@ -37,7 +36,7 @@ export const renderAsync = async (element: React.ReactNode, options?: RenderOpti
config={{
theme: {
extend: {
// colors: config.theme.extend.colors,
colors: config.theme.extend.colors,
},
},
}}