Просмотр исходного кода

ignore: add reply-to support for enterprise form emails

Jay V 2 месяцев назад
Родитель
Сommit
35d118b0c4

+ 1 - 0
packages/console/app/src/routes/api/enterprise.ts

@@ -36,6 +36,7 @@ ${body.email}`.trim()
       to: "[email protected]",
       subject: `Enterprise Inquiry from ${body.name}`,
       body: emailContent,
+      replyTo: body.email,
     })
 
     return Response.json({ success: true, message: "Form submitted successfully" }, { status: 200 })

+ 2 - 0
packages/console/core/src/aws.ts

@@ -22,6 +22,7 @@ export namespace AWS {
       to: z.string(),
       subject: z.string(),
       body: z.string(),
+      replyTo: z.string().optional(),
     }),
     async (input) => {
       const res = await createClient().fetch("https://email.us-east-1.amazonaws.com/v2/email/outbound-emails", {
@@ -35,6 +36,7 @@ export namespace AWS {
           Destination: {
             ToAddresses: [input.to],
           },
+          ...(input.replyTo && { ReplyToAddresses: [input.replyTo] }),
           Content: {
             Simple: {
               Subject: {