Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
10 changes: 5 additions & 5 deletions packages/email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"dependencies": {
"@dub/utils": "workspace:*",
"@react-email/components": "^0.0.22",
"react-email": "^2.1.6",
"lucide-react": "^0.462.0",
"resend": "^4.0.0",
"nodemailer": "^6.9.3"
"nodemailer": "^6.9.3",
"react-email": "^2.1.6",
"resend": "^6.1.2"
},
"devDependencies": {
"typescript": "^5.4.4",
"@types/nodemailer": "~6.4.17",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.14",
"@types/nodemailer": "~6.4.17"
"typescript": "^5.4.4"
},
"peerDependencies": {
"react": "^18.2.0",
Expand Down
5 changes: 1 addition & 4 deletions packages/email/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { CreateBatchResponse } from "resend";
import { resend } from "./resend";
import { ResendBulkEmailOptions, ResendEmailOptions } from "./resend/types";
import { sendViaNodeMailer } from "./send-via-nodemailer";
Expand Down Expand Up @@ -29,9 +28,7 @@ export const sendEmail = async (opts: ResendEmailOptions) => {
);
};

export const sendBatchEmail = async (
payload: ResendBulkEmailOptions,
): Promise<CreateBatchResponse> => {
export const sendBatchEmail = async (payload: ResendBulkEmailOptions) => {
if (resend) {
return await sendBatchEmailViaResend(payload);
}
Expand Down
5 changes: 1 addition & 4 deletions packages/email/src/send-via-resend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { CreateBatchResponse } from "resend";
import { resend } from "./resend";
import { VARIANT_TO_FROM_MAP } from "./resend/constants";
import { ResendBulkEmailOptions, ResendEmailOptions } from "./resend/types";
Expand Down Expand Up @@ -53,9 +52,7 @@ export const sendEmailViaResend = async (opts: ResendEmailOptions) => {
return await resend.emails.send(resendEmailForOptions(opts));
};

export const sendBatchEmailViaResend = async (
opts: ResendBulkEmailOptions,
): Promise<CreateBatchResponse> => {
export const sendBatchEmailViaResend = async (opts: ResendBulkEmailOptions) => {
if (!resend) {
console.info(
"RESEND_API_KEY is not set in the .env. Skipping sending email.",
Expand Down
180 changes: 91 additions & 89 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.