File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
apps/website/app/api/contact Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { NextRequest } from "next/server";
22import { NextResponse } from "next/server" ;
33import { Resend } from "resend" ;
44
5- const resend = new Resend ( process . env . RESEND_API_KEY ) ;
5+ const resend = new Resend ( process . env . RESEND_API_KEY || "" ) ;
66
77interface ContactFormData {
88 inquiryType : "support" | "sales" | "other" ;
@@ -61,7 +61,10 @@ Sent from Dokploy website contact form
6161 // Send email to Dokploy team
6262 await resend . emails . send ( {
6363 from : "Dokploy Contact Form <noreply@emails.dokploy.com>" ,
64- to : [ "sales@dokploy.com" , "contact@dokploy.com" ] ,
64+ to :
65+ body . inquiryType === "sales"
66+ ? [ "sales@dokploy.com" , "contact@dokploy.com" ]
67+ : [ "contact@dokploy.com" ] ,
6568 subject : emailSubject ,
6669 text : emailBody ,
6770 replyTo : body . email ,
You can’t perform that action at this time.
0 commit comments