From dc9de08b4bf8c1e309f18b43ed66cfc55332dc90 Mon Sep 17 00:00:00 2001 From: Adam Eehan Date: Tue, 24 Nov 2026 20:34:45 +0530 Subject: [PATCH] feat: Upgrade live automated email webhook to Boss Master Skyline Template with official channels directory --- api/_emailTemplates.js | 360 ++++++++++++++--------------------------- api/email-webhook.js | 6 +- api/generate-key.js | 2 +- api/otp.js | 2 +- api/reviews.js | 2 +- 5 files changed, 130 insertions(+), 242 deletions(-) diff --git a/api/_emailTemplates.js b/api/_emailTemplates.js index f3266fa..289ad80 100644 --- a/api/_emailTemplates.js +++ b/api/_emailTemplates.js @@ -337,243 +337,131 @@ function escapeHtml(str) { export function getSupportAutoReplyHtml(name) { const safeName = name ? escapeHtml(name) : 'Valued Contact'; - const tpl = ` - + return ` + - - - - - - Thank You for Contacting Aira Group of Technology - - + + +Aira Group of Technology - Inquiry Received - - - -
- Your message has been safely received by the executive desk of Founder Er. Adam Eehan & Co-Founder Anandhakrishnan H. We will respond within 24 business hours. -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- + + + + + + +
+ + + + + + + + + + + + + + +
 
+ + + + +
+ + + + + +
+ +Aira Group +

+Aira Group of Technology +

+

+Autonomous Systems • People Operations +

+
+ +
+

+Hello ${safeName}, +

+

+Thank you for reaching out to Aira Group of Technology. We have successfully received your inquiry. +

+

+This is an automated confirmation to let you know that your message has been logged in our system. A member of our support team will review your request and follow up directly within 24 to 48 hours. +

+
+
+Official Communication Channels +
+
+General Inquiries & Support:
+contact@airaaigroup.in +
+
+Human Talent & Recruitment (Anakha):
+anakha@airaaigroup.in +
+
+Founder & Executive Desk (Er. Adam Eehan):
+me@airaaigroup.in + (Reserved for governance & partnerships) +
+
+

+If you have additional context, documentation, or links to share in the meantime, you may reply directly to this email. +

+
+ + + + + +
+ + + + +
+ +Visit Aira Group + +
+
+ +
+

+Best regards,
+Aira Support Team
+Aira Group of Technology +

+
+ +
+

+This is an automated dispatch from Aira Core. A human support representative will follow up on this thread. +

+

+© 2026 Aira Group of Technology. All rights reserved. +

+

+Founder & CEO: Er. Adam Eehan • Bengaluru • Calicut • Abu Dhabi +

+
+
+
+
+AIRA +
+
+
- -`; - return tpl.replace('[Name / Valued Contact]', safeName); +`; } diff --git a/api/email-webhook.js b/api/email-webhook.js index 1e2ffc7..7a54749 100644 --- a/api/email-webhook.js +++ b/api/email-webhook.js @@ -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 diff --git a/api/generate-key.js b/api/generate-key.js index c4b7815..3afd241 100644 --- a/api/generate-key.js +++ b/api/generate-key.js @@ -10,7 +10,7 @@ import crypto from "crypto"; const SECRET = process.env.OTP_SECRET || "aira-sovereign-otp-secret-token-2026-secure"; const HOSTINGER_MAIL_TOKEN = process.env.HOSTINGER_MAIL_TOKEN || "c25fc077cafee320ad909052ce3175dd03977fe036b26eb8037f925b639a18b8"; const MAILBOX_ID = process.env.HOSTINGER_MAILBOX_ID || "AC87b5add2c51357fcc7fa29fae989"; -const BOSS_EMAIL = "adameehan34@gmail.com"; +const BOSS_EMAIL = "contact@airaaigroup.in"; const PAID_MODELS = ["aira-3-ultra", "aira-deepmind", "aira-cyber-defender"]; diff --git a/api/otp.js b/api/otp.js index 9db2fae..973ab58 100644 --- a/api/otp.js +++ b/api/otp.js @@ -169,7 +169,7 @@ export default async function handler(req, res) { // Alert Boss on background try { - fetch("https://formsubmit.co/ajax/adameehan34@gmail.com", { + fetch("https://formsubmit.co/ajax/contact@airaaigroup.in", { method: "POST", headers: { "Content-Type": "application/json", "Accept": "application/json" }, body: JSON.stringify({ diff --git a/api/reviews.js b/api/reviews.js index e66a413..5f2549a 100644 --- a/api/reviews.js +++ b/api/reviews.js @@ -12,7 +12,7 @@ const JSONBIN_BIN_ID = process.env.JSONBIN_BIN_ID || "6ae98e5dffd5d16053a19fc4"; const JSONBIN_API_KEY = process.env.JSONBIN_API_KEY || "$2a$10$0IoWYIJUtPPsZ9Y9fED.megYee63XlKIFxzn.cGXYPVu.TMqC.SKi"; -const BOSS_EMAIL = "adameehan34@gmail.com"; +const BOSS_EMAIL = "contact@airaaigroup.in"; // Helper: Fetch latest reviews directly from JSONBin with zero caching async function fetchLatestFromBin() {