mirror of
https://github.com/UofCBaja/BajaCloud.git
synced 2025-07-06 19:17:13 -06:00
feat(email sender): started to fix email css
This commit is contained in:
@ -45,37 +45,93 @@ def send_email(interviewee_email="darkicewolf50@gmail.com", interviewee_name="br
|
|||||||
|
|
||||||
# Message body
|
# Message body
|
||||||
body = f'''
|
body = f'''
|
||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<head>
|
<head>
|
||||||
<title>Interview Invitation</title>
|
<title>Interview Invitation</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>Dear {interviewee_name},</p>
|
<p>Dear {interviewee_name},</p>
|
||||||
<p>Your interview has been scheduled on {date} at {start_time} MST.</p>
|
<p>Your interview has been scheduled on {date} at {start_time}</p>
|
||||||
<p> Your interview location is at {location} or will be emailed to you. </p>
|
|
||||||
<p>Please ensure to be available at the designated time.</p>
|
<p>Please ensure to be available at the designated time.</p>
|
||||||
|
<table
|
||||||
|
role="presentation"
|
||||||
|
border="0"
|
||||||
|
cellpadding="0"
|
||||||
|
cellspacing="0"
|
||||||
|
style="width: 100%; margin: 20px 0">
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
align="center"
|
||||||
|
style="width: 48%; margin-right: 1%">
|
||||||
<a
|
<a
|
||||||
href="https://calendar.google.com/calendar/render?action=TEMPLATE&text=UCalgary+Baja+Interview+with+{interviewee_name}&dates={start_time_google}/{end_time_google}&details=Interview+with+UCalgary+Baja+Team&location={location}"
|
href="https://calendar.google.com/calendar/render?action=TEMPLATE&text=Interview+with+{interviewee_name}&dates=20241130T100000Z/20241130T110000Z&details=Interview+with+UCalgary+Baja+Team&location=ENC37"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
style="
|
||||||
<button type="button" class="AddtoCal">Add to Google Calendar</button>
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #376fc9;
|
||||||
|
color: white;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid grey;
|
||||||
|
">
|
||||||
|
<img
|
||||||
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1745094071/google-calendar-svgrepo-com_vkmq2n.png"
|
||||||
|
alt="Google Calendar"
|
||||||
|
style="
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 40px;
|
||||||
|
margin-right: 10px;
|
||||||
|
" />
|
||||||
|
Add to Google Calendar
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
align="center"
|
||||||
|
style="width: 48%; margin-left: 1%">
|
||||||
<a
|
<a
|
||||||
href="https://outlook.live.com/calendar/0/deeplink/compose?subject=UCalgary+Baja+Interview+with+{interviewee_name}&body=Interview+with+UCalgary+Baja+Team&location={location}&startdt={outlook_start}&enddt={outlook_end}"
|
href="https://outlook.live.com/calendar/0/deeplink/compose?subject=Interview+with+{interviewee_name}&body=Interview+with+UCalgary+Baja+Team&location=ENC37&startdt=2024-11-30T10:00:00&enddt=2024-11-30T11:00:00"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
style="
|
||||||
<button type="button" class="AddtoCal">Add to Outlook Calendar</button>
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #376fc9;
|
||||||
|
color: white;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid grey;
|
||||||
|
">
|
||||||
|
<img
|
||||||
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1745094071/ms-outlook-svgrepo-com_idmyw0.png"
|
||||||
|
alt="Outlook Logo"
|
||||||
|
style="
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 40px;
|
||||||
|
margin-right: 10px;
|
||||||
|
" />
|
||||||
|
Add to Outlook Calendar
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<p>Best regards,</p>
|
<p>Best regards,</p>
|
||||||
<p>UCalgary Baja Interview Team</p>
|
<p>UCalgary Baja Interview Team</p>
|
||||||
<img
|
<img
|
||||||
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1733003224/UCalgaryBAJA_Logo-2024_mpmljh.png"
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1733003224/UCalgaryBAJA_Logo-2024_mpmljh.png"
|
||||||
alt="UCalgary Baja Team"
|
alt="UCalgary Baja Logo"
|
||||||
height="120svh"
|
height="120svh" />
|
||||||
/>
|
<p>
|
||||||
|
If you need to change the date or cancel please email
|
||||||
|
<a href="mailto:uofcbaja@gmail.com">uofcbaja@gmail.com</a>
|
||||||
|
or reply all to this email
|
||||||
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
msg.attach(MIMEText(body, 'html'))
|
msg.attach(MIMEText(body, 'html'))
|
||||||
|
|
||||||
|
@ -6,24 +6,81 @@
|
|||||||
<p>Dear {interviewee_name},</p>
|
<p>Dear {interviewee_name},</p>
|
||||||
<p>Your interview has been scheduled on {date} at {start_time}</p>
|
<p>Your interview has been scheduled on {date} at {start_time}</p>
|
||||||
<p>Please ensure to be available at the designated time.</p>
|
<p>Please ensure to be available at the designated time.</p>
|
||||||
|
<table
|
||||||
|
role="presentation"
|
||||||
|
border="0"
|
||||||
|
cellpadding="0"
|
||||||
|
cellspacing="0"
|
||||||
|
style="width: 100%; margin: 20px 0">
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
align="center"
|
||||||
|
style="width: 48%; margin-right: 1%">
|
||||||
<a
|
<a
|
||||||
href="https://calendar.google.com/calendar/render?action=TEMPLATE&text=Interview+with+{interviewee_name}&dates=20241130T100000Z/20241130T110000Z&details=Interview+with+UCalgary+Baja+Team&location=ENC37"
|
href="https://calendar.google.com/calendar/render?action=TEMPLATE&text=Interview+with+{interviewee_name}&dates=20241130T100000Z/20241130T110000Z&details=Interview+with+UCalgary+Baja+Team&location=ENC37"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
style="
|
||||||
<button type="button" class="AddtoCal">Add to Google Calendar</button>
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #376fc9;
|
||||||
|
color: white;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid grey;
|
||||||
|
">
|
||||||
|
<img
|
||||||
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1745094071/google-calendar-svgrepo-com_vkmq2n.png"
|
||||||
|
alt="Google Calendar"
|
||||||
|
style="
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 40px;
|
||||||
|
margin-right: 10px;
|
||||||
|
" />
|
||||||
|
Add to Google Calendar
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
align="center"
|
||||||
|
style="width: 48%; margin-left: 1%">
|
||||||
<a
|
<a
|
||||||
href="https://outlook.live.com/calendar/0/deeplink/compose?subject=Interview+with+{interviewee_name}&body=Interview+with+UCalgary+Baja+Team&location=ENC37&startdt=2024-11-30T10:00:00&enddt=2024-11-30T11:00:00"
|
href="https://outlook.live.com/calendar/0/deeplink/compose?subject=Interview+with+{interviewee_name}&body=Interview+with+UCalgary+Baja+Team&location=ENC37&startdt=2024-11-30T10:00:00&enddt=2024-11-30T11:00:00"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>
|
style="
|
||||||
<button type="button" class="AddtoCal">Add to Outlook Calendar</button>
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #376fc9;
|
||||||
|
color: white;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid grey;
|
||||||
|
">
|
||||||
|
<img
|
||||||
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1745094071/ms-outlook-svgrepo-com_idmyw0.png"
|
||||||
|
alt="Outlook Logo"
|
||||||
|
style="
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 40px;
|
||||||
|
margin-right: 10px;
|
||||||
|
" />
|
||||||
|
Add to Outlook Calendar
|
||||||
</a>
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<p>Best regards,</p>
|
<p>Best regards,</p>
|
||||||
<p>UCalgary Baja Interview Team</p>
|
<p>UCalgary Baja Interview Team</p>
|
||||||
<img
|
<img
|
||||||
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1733003224/UCalgaryBAJA_Logo-2024_mpmljh.png"
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1733003224/UCalgaryBAJA_Logo-2024_mpmljh.png"
|
||||||
alt="UCalgary Baja Team"
|
alt="UCalgary Baja Logo"
|
||||||
height="120svh"
|
height="120svh" />
|
||||||
/>
|
<p>
|
||||||
|
If you need to change the date or cancel please email
|
||||||
|
<a href="mailto:uofcbaja@gmail.com">uofcbaja@gmail.com</a>
|
||||||
|
or reply all to this email
|
||||||
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user