@@ -4,7 +4,7 @@ import { render } from "@react-email/components"
44import nodemailer from "nodemailer"
55import { CreateEmailOptions } from "resend"
66
7- import { resend } from "@/lib /resend"
7+ import { resend } from "@/libs /resend"
88
99// Send email using SMTP (Recommended for local development)
1010const sendEmailViaSMTP = async ( {
@@ -63,18 +63,21 @@ export const sendEmailViaResend = async ({
6363 return await resend . emails . send ( {
6464 to : email ,
6565 from :
66- from || ( marketing ? "Steven from Dub.co <steven@ship.dub.co>" : "Dub.co <system@dub.co>" ) ,
66+ from ||
67+ ( marketing
68+ ? "Luan Nguyen from codeforstartup.com <support@codeforstartup.com>"
69+ : "codeforstartup.com <support@codeforstartup.com>" ) ,
6770 bcc : bcc ,
6871 ...( ! replyToFromEmail && {
69- replyTo : "support@dub.co " ,
72+ replyTo : "support@codeforstartup.com " ,
7073 } ) ,
7174 subject : subject ,
7275 text : text ,
7376 react : react ,
7477 scheduledAt,
7578 ...( marketing && {
7679 headers : {
77- "List-Unsubscribe" : "https://app.dub.co/account/settings" ,
80+ "List-Unsubscribe" : process . env . NEXT_PUBLIC_FRONTEND_URL ,
7881 } ,
7982 } ) ,
8083 } )
@@ -97,6 +100,8 @@ export const sendEmail = async ({
97100 marketing ?: boolean
98101} ) => {
99102 if ( resend ) {
103+ console . info ( "sendmail..." , email )
104+
100105 return await sendEmailViaResend ( {
101106 email,
102107 subject,
0 commit comments