Update routes/support.py
Browse files- routes/support.py +32 -45
routes/support.py
CHANGED
@@ -195,7 +195,7 @@ async def respond_ticket(
|
|
195 |
user_name = user_data[0].get("name", "user").strip()
|
196 |
first_name = user_name.split(" ")[0] if user_name else "user"
|
197 |
|
198 |
-
# 4. Send email with
|
199 |
access_token = await get_gmail_access_token()
|
200 |
subject = f"Customer Support - Case {payload.ticket_id}"
|
201 |
|
@@ -204,51 +204,38 @@ async def respond_ticket(
|
|
204 |
<html lang="en">
|
205 |
<head>
|
206 |
<meta charset="UTF-8" />
|
|
|
207 |
</head>
|
208 |
-
<body style="margin:0;padding:0;background-color:#
|
209 |
-
<table width="
|
210 |
-
<
|
211 |
-
<
|
212 |
-
<
|
213 |
-
<
|
214 |
-
<
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
<
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
{payload.content}
|
239 |
-
<p style="margin:16px 0 0 0">Best regards,</p>
|
240 |
-
<p style="margin:4px 0 0 0">{support_name}<br>Customer Support</p>
|
241 |
-
</td>
|
242 |
-
</tr>
|
243 |
-
</tbody>
|
244 |
-
</table>
|
245 |
-
</td>
|
246 |
-
</tr>
|
247 |
-
</tbody>
|
248 |
-
</table>
|
249 |
-
</td>
|
250 |
-
</tr>
|
251 |
-
</tbody>
|
252 |
</table>
|
253 |
</body>
|
254 |
</html>
|
|
|
195 |
user_name = user_data[0].get("name", "user").strip()
|
196 |
first_name = user_name.split(" ")[0] if user_name else "user"
|
197 |
|
198 |
+
# 4. Send email with clean, elegant HTML template
|
199 |
access_token = await get_gmail_access_token()
|
200 |
subject = f"Customer Support - Case {payload.ticket_id}"
|
201 |
|
|
|
204 |
<html lang="en">
|
205 |
<head>
|
206 |
<meta charset="UTF-8" />
|
207 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
208 |
</head>
|
209 |
+
<body style="margin:0;padding:0;background-color:#f9f9f9;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;">
|
210 |
+
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#f9f9f9">
|
211 |
+
<tr>
|
212 |
+
<td align="center" style="padding:40px 10px;">
|
213 |
+
<table width="600" cellpadding="0" cellspacing="0" border="0" style="background:#ffffff;box-shadow:0 2px 4px rgba(0,0,0,0.1);">
|
214 |
+
<tr>
|
215 |
+
<td style="height:5px;background:linear-gradient(to right, #4a90e2, #50e3c2);"></td>
|
216 |
+
</tr>
|
217 |
+
<tr>
|
218 |
+
<td style="padding:30px 40px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1.6;color:#333333;">
|
219 |
+
<p style="margin:0 0 20px;font-size:15px;color:#333333;">Hello {first_name},</p>
|
220 |
+
<div style="margin:0 0 20px;color:#333333;">
|
221 |
+
{payload.content}
|
222 |
+
</div>
|
223 |
+
<p style="margin:20px 0 0;font-size:15px;color:#333333;">Best regards,</p>
|
224 |
+
<p style="margin:2px 0 0;font-size:15px;color:#333333;">{support_name}</p>
|
225 |
+
<p style="margin:2px 0 0;font-size:14px;color:#666666;">Customer Support</p>
|
226 |
+
</td>
|
227 |
+
</tr>
|
228 |
+
<tr>
|
229 |
+
<td style="height:1px;background:#f0f0f0;"></td>
|
230 |
+
</tr>
|
231 |
+
<tr>
|
232 |
+
<td style="padding:20px;text-align:center;font-size:12px;color:#999999;">
|
233 |
+
ClosetCoach © 2025
|
234 |
+
</td>
|
235 |
+
</tr>
|
236 |
+
</table>
|
237 |
+
</td>
|
238 |
+
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
</table>
|
240 |
</body>
|
241 |
</html>
|