@@ -109,6 +109,7 @@ async def _send_confirmation(email: str, name: str) -> None:
109109 """
110110
111111 async with httpx .AsyncClient () as client :
112+ # Send confirmation to user
112113 await client .post (
113114 "https://api.resend.com/emails" ,
114115 headers = {"Authorization" : f"Bearer { settings .RESEND_API_KEY } " },
@@ -120,6 +121,34 @@ async def _send_confirmation(email: str, name: str) -> None:
120121 },
121122 timeout = 10 ,
122123 )
124+ # Notify admin
125+ await client .post (
126+ "https://api.resend.com/emails" ,
127+ headers = {"Authorization" : f"Bearer { settings .RESEND_API_KEY } " },
128+ json = {
129+ "from" : "Mailair Waitlist <hello@mailair.company>" ,
130+ "to" : ["saisridhart@gmail.com" ],
131+ "subject" : f"🎉 New waitlist signup: { email } " ,
132+ "html" : f"""
133+ <div style="font-family:sans-serif;max-width:480px;margin:40px auto;background:#f8fafc;border-radius:16px;padding:32px;border:1px solid #e2e8f0;">
134+ <h2 style="margin:0 0 8px;color:#0f172a;font-size:20px;">New waitlist signup</h2>
135+ <p style="margin:0 0 20px;color:#64748b;font-size:14px;">Someone just joined the Mailair waitlist.</p>
136+ <table style="width:100%;border-collapse:collapse;">
137+ <tr>
138+ <td style="padding:10px 14px;background:#fff;border:1px solid #e2e8f0;border-radius:8px 8px 0 0;font-size:13px;color:#64748b;font-weight:600;">NAME</td>
139+ <td style="padding:10px 14px;background:#fff;border:1px solid #e2e8f0;border-top:none;font-size:14px;color:#0f172a;">{ name or "—" } </td>
140+ </tr>
141+ <tr>
142+ <td style="padding:10px 14px;background:#fff;border:1px solid #e2e8f0;border-top:none;border-radius:0 0 8px 8px;font-size:13px;color:#64748b;font-weight:600;">EMAIL</td>
143+ <td style="padding:10px 14px;background:#fff;border:1px solid #e2e8f0;border-top:none;font-size:14px;color:#2563eb;">{ email } </td>
144+ </tr>
145+ </table>
146+ <p style="margin:24px 0 0;color:#94a3b8;font-size:12px;text-align:center;">Mailair · mailair.company</p>
147+ </div>
148+ """ ,
149+ },
150+ timeout = 10 ,
151+ )
123152
124153
125154@router .post ("/api/waitlist" )
0 commit comments