habulaj commited on
Commit
b6a7053
·
verified ·
1 Parent(s): 5ef84b9

Update routes/support.py

Browse files
Files changed (1) hide show
  1. routes/support.py +81 -92
routes/support.py CHANGED
@@ -187,102 +187,91 @@ async def respond_ticket(
187
  support_data = await support_resp.json()
188
  support_name = support_data[0].get("name", "Support Team")
189
 
190
- # E-mail HTML atualizado com o novo estilo e temas de cor
191
  email_html = f"""\
192
- <!DOCTYPE html>
193
- <html lang="en">
194
- <head>
195
- <meta charset="UTF-8">
196
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
197
- <meta name="color-scheme" content="light dark">
198
- <title>Support Email</title>
199
- <style>
200
- :root {{
201
- color-scheme: light dark;
202
- }}
203
-
204
- @media (prefers-color-scheme: dark) {{
205
- body {{
206
- background-color: #121212 !important;
207
- color: #e0e0e0 !important;
208
- }}
209
- .email-container {{
210
- background-color: #1e1e1e !important;
211
- border-color: #333333 !important;
212
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
213
- }}
214
- .divider {{
215
- border-color: #333333 !important;
216
- }}
217
- .subtle-text {{
218
- color: #a0a0a0 !important;
219
- }}
220
- .signature {{
221
- background-color: #252525 !important;
222
- }}
223
- .footer {{
224
- color: #848484 !important;
225
- }}
226
- }}
227
- </style>
228
- </head>
229
- <body style="margin: 0; padding: 0; background-color: #f5f5f5; font-family: 'Helvetica Neue', Arial, sans-serif; color: #333333; line-height: 1.6;">
230
- <table width="100%" cellpadding="0" cellspacing="0" style="max-width: 620px; margin: 0 auto; padding: 30px 15px;">
231
- <tr>
232
- <td>
233
- <table class="email-container" width="100%" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border-radius: 8px; overflow: hidden; border: 1px solid #e6e6e6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);">
234
- <tr>
235
- <td style="padding: 30px 35px 10px; text-align: right;">
236
- <span class="subtle-text" style="font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #999999;">Ameddes Support</span>
237
- </td>
238
- </tr>
239
- <tr>
240
- <td style="padding: 10px 35px 25px;">
241
- <table width="100%" cellpadding="0" cellspacing="0">
242
- <tr>
243
- <td class="divider" style="border-top: 1px solid #eeeeee; padding-top: 25px;">
244
- <p style="margin-top: 0; font-size: 15px;">Hello {first_name},</p>
245
-
246
- <p style="font-size: 15px;">My name is {support_name} from the Ameddes Support team.</p>
247
-
248
- <p style="font-size: 15px;">Thank you for reaching out to us. We understand your frustration when encountering difficulties accessing our service.</p>
249
-
250
- <p style="font-size: 15px;">Currently, Streamify is temporarily unavailable while we implement significant improvements. We are developing a new version of the platform that will be available soon for iOS and Android.</p>
251
-
252
- <p style="font-size: 15px;">We're working to ensure the service returns as soon as possible, with an even better experience for you.</p>
253
-
254
- <p style="font-size: 15px;">For updates, follow us on Instagram: @ameddesbrasil</p>
255
-
256
- <p style="font-size: 15px;">I'm available if you need any additional information.</p>
257
- </td>
258
- </tr>
259
- </table>
260
- </td>
261
- </tr>
262
- <tr>
263
- <td class="signature" style="background-color: #f9f9f9; padding: 25px 35px;">
264
- <p style="margin: 0; font-size: 15px;">Best regards,</p>
265
- <p style="margin: 4px 0 0; font-size: 15px;">{support_name}</p>
266
- <p class="subtle-text" style="margin: 3px 0 0; font-size: 13px; color: #777777;">User Support Specialist</p>
267
- <p class="subtle-text" style="margin: 0; font-size: 13px; color: #777777;">Ameddes</p>
268
- </td>
269
- </tr>
270
- <tr>
271
- <td class="footer" style="padding: 20px 35px; font-size: 12px; color: #999999; text-align: center;">
272
- <p style="margin: 0;">This is an automated email. Please reply directly to this message if you need further assistance.</p>
273
- </td>
274
- </tr>
275
- </table>
276
- </td>
277
- </tr>
278
- </table>
279
- </body>
280
- </html>
281
- """
282
 
283
  # Envio de e-mail
284
  access_token = await get_gmail_access_token()
285
- subject = f"Support Case {payload.ticket_id}"
286
 
287
  raw_message = f"""To: {user_email}
288
  From: "ClosetCoach" <[email protected]>
 
187
  support_data = await support_resp.json()
188
  support_name = support_data[0].get("name", "Support Team")
189
 
190
+ # E-mail HTML atualizado em inglês e sem borda branca
191
  email_html = f"""\
192
+ <!DOCTYPE html>
193
+ <html lang="en">
194
+ <head>
195
+ <meta charset="UTF-8" />
196
+ <style>
197
+ body {{
198
+ margin: 0;
199
+ padding: 0;
200
+ background-color: #f4f4f4;
201
+ font-family: 'Arial', sans-serif;
202
+ }}
203
+ .email-container {{
204
+ width: 100%;
205
+ background-color: #f4f4f4;
206
+ padding: 30px 0;
207
+ }}
208
+ .email-content {{
209
+ width: 600px;
210
+ background-color: #ffffff;
211
+ margin: 0 auto;
212
+ padding: 40px;
213
+ border-radius: 8px;
214
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
215
+ }}
216
+ .email-header {{
217
+ text-align: right;
218
+ padding-bottom: 20px;
219
+ }}
220
+ .email-header img {{
221
+ width: 120px;
222
+ height: auto;
223
+ }}
224
+ .email-body {{
225
+ font-size: 16px;
226
+ line-height: 1.6;
227
+ color: #333;
228
+ margin-bottom: 30px;
229
+ }}
230
+ .email-body p {{
231
+ margin: 10px 0;
232
+ }}
233
+ .button {{
234
+ display: inline-block;
235
+ background-color: #007bff;
236
+ color: #ffffff;
237
+ padding: 12px 24px;
238
+ text-decoration: none;
239
+ border-radius: 5px;
240
+ font-weight: bold;
241
+ text-align: center;
242
+ margin-top: 20px;
243
+ }}
244
+ .footer {{
245
+ text-align: center;
246
+ font-size: 12px;
247
+ color: #888;
248
+ padding-top: 20px;
249
+ }}
250
+ </style>
251
+ </head>
252
+ <body>
253
+ <div class="email-container">
254
+ <div class="email-content">
255
+ <div class="email-header">
256
+ <img src="https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/saa-s-cloud-file-management-dashboard-u57zo5/assets/5l30gd1xml6i/Frame_1.png" alt="Logo" />
257
+ </div>
258
+ <div class="email-body">
259
+ <p>Hi {first_name},</p>
260
+ <p>{payload.content}</p>
261
+ <a href="https://www.instagram.com/ameddesbrasil" class="button">Follow us on Instagram</a>
262
+ </div>
263
+ <div class="footer">
264
+ <p>Best regards,<br>{support_name}<br>Customer Support</p>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </body>
269
+ </html>
270
+ """
 
 
 
 
 
 
 
 
 
 
 
271
 
272
  # Envio de e-mail
273
  access_token = await get_gmail_access_token()
274
+ subject = f"Customer Support - Case {payload.ticket_id}"
275
 
276
  raw_message = f"""To: {user_email}
277
  From: "ClosetCoach" <[email protected]>