feat: Upgrade live automated email webhook to Boss Master Skyline Template with official channels directory

This commit is contained in:
Adam Eehan committed 2026-11-24 20:34:45 +05:30
1 parent 5ed6102684
commit dc9de08b4b
5 files changed
+130 -242

No files matched your search

+3 -3
View File
@@ -7,7 +7,7 @@
import { getSupportAutoReplyHtml } from "./_emailTemplates.js";
const HOSTINGER_MAIL_TOKEN = process.env.HOSTINGER_MAIL_TOKEN || "c25fc077cafee320ad909052ce3175dd03977fe036b26eb8037f925b639a18b8";
const RESEND_KEY = process.env.RESEND_API_KEY || "";
const RESEND_KEY = process.env.RESEND_API_KEY || "re_TB9QeX3u_n72owpyDRLA9tSKWXbhoME9g";
// In-memory rate limiting map: `${mailboxId}:${senderEmail}` -> { count, lastReplyTime, cooldownUntil }
const recentReplies = new Map();
@@ -170,8 +170,8 @@ export default async function handler(req, res) {
}
}
// 4. Generate Executive Dark Mode HTML
const cleanName = senderName ? senderName.trim() : "";
// 4. Generate Aira Skyline Master Template HTML
const cleanName = senderName ? senderName.trim() : (senderEmail ? senderEmail.split('@')[0] : "Valued Contact");
const autoReplyHtml = getSupportAutoReplyHtml(cleanName);
const replySubject = subject.toLowerCase().startsWith("re:")
? subject