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

+124 -236
View File
@@ -337,243 +337,131 @@ function escapeHtml(str) {
export function getSupportAutoReplyHtml(name) {
const safeName = name ? escapeHtml(name) : 'Valued Contact';
const tpl = `<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
return `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="color-scheme" content="dark">
<meta name="supported-color-schemes" content="dark">
<title>Thank You for Contacting Aira Group of Technology</title>
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<style>
:root {
color-scheme: dark;
supported-color-schemes: dark;
}
body, table, td, a {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table, td {
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
-ms-interpolation-mode: bicubic;
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
}
body {
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
background-color: #060d19 !important;
color: #cbd5e1;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
@media only screen and (max-width: 620px) {
.container-table {
width: 100% !important;
border-radius: 0 !important;
}
.mobile-p {
padding-left: 20px !important;
padding-right: 20px !important;
}
.mobile-stack {
display: block !important;
width: 100% !important;
}
.mobile-stack-right {
display: block !important;
width: 100% !important;
text-align: left !important;
margin-top: 12px !important;
}
}
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aira Group of Technology - Inquiry Received</title>
</head>
<body style="margin: 0; padding: 0; background-color: #060d19; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #cbd5e1;">
<!-- Preheader text (Hidden in email body, visible in inbox preview) -->
<div style="display: none; font-size: 1px; color: #060d19; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;">
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.
</div>
<!-- Background Wrapper -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #060d19;">
<tr>
<td align="center" style="padding: 40px 12px;">
<!-- Main Card Container (Rich Midnight Obsidian - NOT pure black) -->
<table role="presentation" class="container-table" width="600" cellpadding="0" cellspacing="0" border="0" style="max-width: 600px; width: 100%; background-color: #0c182b; border: 1px solid #1e3557; border-radius: 16px; overflow: hidden; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);">
<!-- Top Gradient Accent Bar -->
<tr>
<td style="background: linear-gradient(90deg, #38bdf8 0%, #2563eb 50%, #818cf8 100%); height: 4px; font-size: 0; line-height: 0;">&nbsp;</td>
</tr>
<!-- HEADER -->
<tr>
<td class="mobile-p" style="padding: 28px 32px 20px 32px; background-color: #091424; border-bottom: 1px solid #162a45;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="46" style="vertical-align: middle;">
<img src="https://airaaigroup.in/assets/logo.png" width="44" height="44" alt="Aira Group Logo" style="display: block; border-radius: 10px; width: 44px; height: 44px; border: 1px solid rgba(56, 189, 248, 0.3); background-color: #0a1b33;">
</td>
<td style="vertical-align: middle; padding-left: 14px;">
<div style="font-size: 19px; font-weight: 800; color: #ffffff; letter-spacing: -0.3px; line-height: 1.2;">
AIRA <span style="font-weight: 500; color: #38bdf8; font-size: 14px;">GROUP OF TECHNOLOGY</span>
</div>
<div style="font-size: 11px; color: #94a3b8; margin-top: 3px; letter-spacing: 0.5px;">
airaaigroup.in &bull; Sovereign Digital Systems
</div>
</td>
<td class="mobile-stack-right" align="right" style="vertical-align: middle;">
<span style="display: inline-block; background-color: rgba(16, 185, 129, 0.15); color: #34d399; font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(52, 211, 153, 0.4); text-transform: uppercase; letter-spacing: 0.5px;">
&bull; Message Received
</span>
</td>
</tr>
</table>
</td>
</tr>
<!-- BODY CONTENT -->
<tr>
<td class="mobile-p" style="padding: 36px 32px 28px 32px;">
<!-- Badge -->
<div style="font-size: 11px; font-weight: 800; color: #38bdf8; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px;">
OFFICIAL EXECUTIVE ACKNOWLEDGMENT
</div>
<!-- Headline -->
<h1 style="margin: 0 0 18px 0; font-size: 24px; font-weight: 800; color: #f8fafc; line-height: 1.35; letter-spacing: -0.4px;">
Thank you for contacting Aira Group of Technology
</h1>
<!-- Greeting -->
<p style="margin: 0 0 16px 0; font-size: 15px; color: #94a3b8; line-height: 1.6;">
Dear <strong style="color: #f1f5f9;">[Name / Valued Contact]</strong>,
</p>
<!-- Main Copy -->
<p style="margin: 0 0 16px 0; font-size: 15px; line-height: 1.7; color: #cbd5e1;">
Thank you for reaching out to Aira Group of Technology. Your communication has been safely received and registered in our central intake dispatch.
</p>
<p style="margin: 0 0 24px 0; font-size: 15px; line-height: 1.7; color: #cbd5e1;">
Your message is directly routed to the executive office of Founder &amp; Chief Executive Officer <strong style="color: #f8fafc;">Er. Adam Eehan</strong> and Co-Founder <strong style="color: #f8fafc;">Anandhakrishnan H</strong>.
</p>
<!-- WHAT HAPPENS NEXT CALLOUT BOX -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #081324; border-left: 4px solid #38bdf8; border-top: 1px solid #172a45; border-right: 1px solid #172a45; border-bottom: 1px solid #172a45; border-radius: 8px; margin: 24px 0;">
<tr>
<td style="padding: 20px 22px;">
<div style="font-size: 14px; font-weight: 800; color: #38bdf8; margin-bottom: 6px; letter-spacing: 0.3px; display: flex; align-items: center; gap: 6px;">
What happens next?
</div>
<p style="margin: 0; font-size: 14px; line-height: 1.65; color: #e2e8f0;">
Our executive leadership team will review your inquiry and respond within <strong style="color: #38bdf8;">24 business hours</strong>.
</p>
<div style="margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: #94a3b8;">
For immediate technical overviews or real-time assistance, our sovereign AI co-pilot (<strong style="color: #a78bfa;">Aira 3 Ultra</strong>) is active 24/7 on our website desk.
</div>
</td>
</tr>
</table>
<!-- Portal Explorer Invitation -->
<p style="margin: 20px 0 16px 0; font-size: 14.5px; line-height: 1.6; color: #94a3b8;">
To explore our sovereign AI research, enterprise engineering suites, and leadership portfolio, please visit our official digital portal:
</p>
<!-- CTA BUTTON -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" style="padding: 10px 0 28px 0;">
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://airaaigroup.in" style="height:46px;v-text-anchor:middle;width:240px;" arcsize="50%" stroke="f" fillcolor="#2563eb">
<w:anchorlock/>
<center style="color:#ffffff;font-family:sans-serif;font-size:14px;font-weight:bold;">Visit Official Portal &rarr;</center>
</v:roundrect>
<![endif]-->
<a href="https://airaaigroup.in" target="_blank" style="display: inline-block; background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); background-color: #2563eb; color: #ffffff; text-decoration: none; font-size: 14px; font-weight: 700; padding: 13px 32px; border-radius: 50px; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35); border: 1px solid #3b82f6;">
Visit Official Portal &rarr;
</a>
</td>
</tr>
</table>
<!-- Divider -->
<hr style="border: none; border-top: 1px solid #162842; margin: 0 0 24px 0;">
<!-- SIGNATURE BLOCK -->
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="vertical-align: top;">
<div style="font-size: 13px; color: #94a3b8; margin-bottom: 4px;">Warm regards,</div>
<div style="font-size: 16px; font-weight: 800; color: #f8fafc; letter-spacing: -0.2px;">
Executive Operations
</div>
<div style="font-size: 13px; font-weight: 600; color: #38bdf8; margin-top: 2px;">
Aira Group of Technology
</div>
<div style="font-size: 12.5px; color: #94a3b8; margin-top: 4px; line-height: 1.5;">
Technopark, Trivandrum, Kerala, India<br>
<a href="mailto:contact@airaaigroup.in" style="color: #38bdf8; text-decoration: none;">contact@airaaigroup.in</a>
&nbsp;&bull;&nbsp;
<a href="mailto:me@airaaigroup.in" style="color: #38bdf8; text-decoration: none;">me@airaaigroup.in</a>
&nbsp;&bull;&nbsp;
<a href="https://airaaigroup.in" style="color: #60a5fa; text-decoration: none;">airaaigroup.in</a>
</div>
</td>
</tr>
</table>
</td>
</tr>
<!-- FOOTER -->
<tr>
<td class="mobile-p" style="background-color: #08111e; padding: 24px 32px; border-top: 1px solid #132238;">
<p style="margin: 0 0 10px 0; font-size: 12px; line-height: 1.55; color: #64748b;">
<strong>Notice:</strong> This is an automated acknowledgment dispatch. Please do not reply directly to this notice. For additional inquiries or follow-ups, write to <a href="mailto:contact@airaaigroup.in" style="color: #38bdf8; text-decoration: none;">contact@airaaigroup.in</a>.
</p>
<p style="margin: 0 0 10px 0; font-size: 11.5px; color: #64748b; line-height: 1.5;">
Aira Group of Technology &nbsp;&bull;&nbsp; Technopark, Thiruvananthapuram, Kerala, India &nbsp;&bull;&nbsp;
<a href="https://airaaigroup.in/privacy" style="color: #94a3b8; text-decoration: none;">Privacy Policy</a>
</p>
<p style="margin: 0; font-size: 11.5px; color: #475569;">
&copy; 2026 Aira Group of Technology. All rights reserved.
</p>
</td>
</tr>
</table>
<!-- End Main Card -->
</td>
</tr>
</table>
<body style="margin: 0; padding: 0; background-color: #eef2f6; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #1e293b;">
<!-- Outer Email Wrapper -->
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #eef2f6; padding: 24px 12px;">
<tr>
<td align="center">
<!-- Main Container (Sky-Blue Gradient Background) -->
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="max-width: 560px; background-color: #cde3fa; background: linear-gradient(180deg, #dcecfb 0%, #8ec1f5 65%, #3b82f6 100%); border-radius: 16px; overflow: hidden;">
<!-- Top Spacing -->
<tr>
<td style="height: 36px; line-height: 36px; font-size: 0;">&nbsp;</td>
</tr>
<!-- Floating White Content Card -->
<tr>
<td align="center" style="padding: 0 22px 16px 22px;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="background-color: #ffffff; border-radius: 24px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);">
<tr>
<td style="padding: 40px 30px 36px 30px;">
<!-- Brand Header & Logo -->
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" style="padding-bottom: 28px;">
<!-- Replace [Nammade_LOGO_URL] with your hosted logo image link -->
<img src="https://gitlab.com/adameehantech/aira-talent-portal/-/raw/main/logo.png" alt="Aira Group" width="76" style="display: block; width: 76px; height: auto; margin: 0 auto 16px auto; border-radius: 14px; border: 0;">
<h1 style="margin: 0 0 6px 0; font-size: 22px; font-weight: 700; color: #0f172a; letter-spacing: -0.3px;">
Aira Group of Technology
</h1>
<p style="margin: 0; font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 1.2px; line-height: 1.4;">
Autonomous Systems &bull; People Operations
</p>
</td>
</tr>
</table>
<!-- Email Body Text -->
<div style="text-align: left; font-size: 16px; line-height: 1.65; color: #334155;">
<p style="margin: 0 0 18px 0; font-weight: 600; color: #0f172a;">
Hello ${safeName},
</p>
<p style="margin: 0 0 18px 0;">
Thank you for reaching out to Aira Group of Technology. We have successfully received your inquiry.
</p>
<p style="margin: 0 0 18px 0;">
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.
</p>
<div style="background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px; margin: 22px 0 24px 0; font-size: 13.5px; line-height: 1.7; color: #334155;">
<div style="font-weight: 700; color: #0f172a; margin-bottom: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px;">
Official Communication Channels
</div>
<div style="margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #edf2f7;">
<strong style="color: #0f172a;">General Inquiries &amp; Support:</strong><br>
<a href="mailto:contact@airaaigroup.in" style="color: #1665d8; text-decoration: none; font-weight: 500;">contact@airaaigroup.in</a>
</div>
<div style="margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #edf2f7;">
<strong style="color: #0f172a;">Human Talent &amp; Recruitment (Anakha):</strong><br>
<a href="mailto:anakha@airaaigroup.in" style="color: #1665d8; text-decoration: none; font-weight: 500;">anakha@airaaigroup.in</a>
</div>
<div>
<strong style="color: #0f172a;">Founder &amp; Executive Desk (Er. Adam Eehan):</strong><br>
<a href="mailto:me@airaaigroup.in" style="color: #1665d8; text-decoration: none; font-weight: 500;">me@airaaigroup.in</a>
<span style="font-size: 11.5px; color: #64748b;"> (Reserved for governance &amp; partnerships)</span>
</div>
</div>
<p style="margin: 0 0 28px 0;">
If you have additional context, documentation, or links to share in the meantime, you may reply directly to this email.
</p>
</div>
<!-- Pill CTA Button -->
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="margin: 8px 0 32px 0;">
<tr>
<td align="center">
<table role="presentation" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" style="background-color: #1665d8; border-radius: 50px;">
<a href="https://airagroup.in" target="_blank" style="display: inline-block; padding: 14px 36px; font-size: 16px; font-weight: 600; color: #ffffff; text-decoration: none; letter-spacing: 0.2px;">
Visit Aira Group
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- Sign-off -->
<div style="text-align: left; font-size: 15px; line-height: 1.6; color: #334155; padding-bottom: 24px; border-bottom: 1px solid #e2e8f0;">
<p style="margin: 0;">
Best regards,<br>
<strong style="color: #0f172a;">Aira Support Team</strong><br>
<span style="color: #64748b; font-size: 14px;">Aira Group of Technology</span>
</p>
</div>
<!-- Automated Dispatch Note & Footer Details -->
<div style="text-align: center; padding-top: 20px; font-size: 12px; line-height: 1.6; color: #64748b;">
<p style="margin: 0 0 12px 0; font-style: italic; color: #64748b;">
This is an automated dispatch from Aira Core. A human support representative will follow up on this thread.
</p>
<p style="margin: 0 0 4px 0; font-weight: 500; color: #475569;">
&copy; 2026 Aira Group of Technology. All rights reserved.
</p>
<p style="margin: 0; color: #64748b;">
Founder &amp; CEO: Er. Adam Eehan &bull; Bengaluru &bull; Calicut &bull; Abu Dhabi
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
<!-- Bottom AIRA Wordmark Footer -->
<tr>
<td align="center" style="padding: 32px 16px 0 16px; overflow: hidden;">
<div style="font-size: 112px; font-weight: 900; line-height: 0.78; letter-spacing: -4px; color: #ffffff; text-transform: uppercase; user-select: none;">
AIRA
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
`;
return tpl.replace('[Name / Valued Contact]', safeName);
</html>`;
}
+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
+1 -1
View File
@@ -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"];
+1 -1
View File
@@ -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({
+1 -1
View File
@@ -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() {