Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cde2416

Browse filesBrowse files
committed
Update daily digest email content with new date, quote, weather location, and Wikipedia fact; modify recipient handling for multiple emails
1 parent 5ba2f16 commit cde2416
Copy full SHA for cde2416

File tree

Expand file treeCollapse file tree

3 files changed

+26
-25
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+26
-25
lines changed
Open diff view settings
Collapse file

‎start_your_day/backend/email.html‎

Copy file name to clipboardExpand all lines: start_your_day/backend/email.html
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Daily Digest - 09 December 2024</title>
7+
<title>Daily Digest - 10 December 2024</title>
88
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
99
<style>
1010
body {
@@ -54,32 +54,32 @@
5454
<div class="container">
5555
<h1>🌞 Daily Digest</h1>
5656
<p style="text-align: center; color: #7f8c8d;">
57-
09 December 2024
57+
10 December 2024
5858
</p>
5959

6060

6161
<div class="section quote">
6262
<h2>📜 Quote of the Day</h2>
6363
<blockquote>
64-
<i> I do wish we could chat longer, but I'm having an old friend for dinner.</i>
65-
<footer>Anthony Hopkins, The Silence of the Lambs, </footer>
64+
<i> Every champion was once a contender that refused to give up.</i>
65+
<footer>Sylvester Stallone, Rocky, </footer>
6666
</blockquote>
6767
</div>
6868

6969

7070
<div class="section weather">
7171
<h2>🌦️ Weather Forecast</h2>
72-
<p><strong>Location:</strong> Franconville, FR</p>
72+
<p><strong>Location:</strong> Le Plessis-Bouchard, FR</p>
7373
<ul>
74-
<li>2024-12-09 07:00:00: Overcast Clouds, 5.74°C</li><li>2024-12-09 10:00:00: Overcast Clouds, 5.6°C</li><li>2024-12-09 13:00:00: Overcast Clouds, 5.78°C</li><li>2024-12-09 16:00:00: Light Rain, 5.91°C</li><li>2024-12-09 19:00:00: Light Rain, 4.53°C</li><li>2024-12-09 22:00:00: Light Rain, 4.74°C</li><li>2024-12-10 01:00:00: Light Rain, 5.08°C</li><li>2024-12-10 04:00:00: Overcast Clouds, 4.53°C</li><li>2024-12-10 07:00:00: Overcast Clouds, 4.63°C</li>
74+
<li>2024-12-10 01:00:00: Overcast Clouds, 5.53°C</li><li>2024-12-10 04:00:00: Overcast Clouds, 5.32°C</li><li>2024-12-10 07:00:00: Overcast Clouds, 5.06°C</li><li>2024-12-10 10:00:00: Light Rain, 5.43°C</li><li>2024-12-10 13:00:00: Overcast Clouds, 5.41°C</li><li>2024-12-10 16:00:00: Overcast Clouds, 5.81°C</li><li>2024-12-10 19:00:00: Overcast Clouds, 5.4°C</li><li>2024-12-10 22:00:00: Overcast Clouds, 5.07°C</li><li>2024-12-11 01:00:00: Overcast Clouds, 4.8°C</li>
7575
</ul>
7676
</div>
7777

7878

7979
<div class="section wikipedia">
8080
<h2>🧠 Did You Know?</h2>
81-
<p>Sarah Millicent Hermione Touchet-Jesson, Baroness Audley, was an English actress and dancer and a daughter of Winston Churchill.</p>
82-
<p><em>Source: <a href="https://en.wikipedia.org/wiki/Sarah_Churchill_(actress)">https://en.wikipedia.org/wiki/Sarah_Churchill_(actress)</a></em></p>
81+
<p>Ostenia is a genus of flies in the family Dolichopodidae. It contains only one species, Ostenia robusta, which is endemic to New Zealand. The species was first described by Frederick Hutton in 1901, and the genus was named after Carl Robert Osten-Sacken.</p>
82+
<p><em>Source: <a href="https://en.wikipedia.org/wiki/Ostenia">https://en.wikipedia.org/wiki/Ostenia</a></em></p>
8383
</div>
8484

8585
<div class="footer">
Collapse file

‎start_your_day/backend/email.txt‎

Copy file name to clipboard
+15-15Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
🌞 Daily Digest - 09 December 2024 🌞
1+
🌞 Daily Digest - 10 December 2024 🌞
22
==================================================
33

44
📜 Quote of the Day 📜
55
-------------------------
6-
I do wish we could chat longer, but I'm having an old friend for dinner.❞
7-
- Anthony Hopkins, The Silence of the Lambs,
6+
Every champion was once a contender that refused to give up.❞
7+
- Sylvester Stallone, Rocky,
88

9-
🌦️ Weather Forecast: Franconville, FR 🌦️
9+
🌦️ Weather Forecast: Le Plessis-Bouchard, FR 🌦️
1010
--------------------------------------------------
11-
• 2024-12-09 07:00:00: Overcast Clouds | 5.74°C
12-
• 2024-12-09 10:00:00: Overcast Clouds | 5.6°C
13-
• 2024-12-09 13:00:00: Overcast Clouds | 5.78°C
14-
• 2024-12-09 16:00:00: Light Rain | 5.91°C
15-
• 2024-12-09 19:00:00: Light Rain | 4.53°C
16-
• 2024-12-09 22:00:00: Light Rain | 4.74°C
17-
• 2024-12-10 01:00:00: Light Rain | 5.08°C
18-
• 2024-12-10 04:00:00: Overcast Clouds | 4.53°C
19-
• 2024-12-10 07:00:00: Overcast Clouds | 4.63°C
11+
• 2024-12-10 01:00:00: Overcast Clouds | 5.53°C
12+
• 2024-12-10 04:00:00: Overcast Clouds | 5.32°C
13+
• 2024-12-10 07:00:00: Overcast Clouds | 5.06°C
14+
• 2024-12-10 10:00:00: Light Rain | 5.43°C
15+
• 2024-12-10 13:00:00: Overcast Clouds | 5.41°C
16+
• 2024-12-10 16:00:00: Overcast Clouds | 5.81°C
17+
• 2024-12-10 19:00:00: Overcast Clouds | 5.4°C
18+
• 2024-12-10 22:00:00: Overcast Clouds | 5.07°C
19+
• 2024-12-11 01:00:00: Overcast Clouds | 4.8°C
2020

2121
🧠 Did You Know? 🧠
2222
-------------------------
23-
Sarah Millicent Hermione Touchet-Jesson, Baroness Audley, was an English actress and dancer and a daughter of Winston Churchill.
24-
(Source: https://en.wikipedia.org/wiki/Sarah_Churchill_(actress))
23+
Ostenia is a genus of flies in the family Dolichopodidae. It contains only one species, Ostenia robusta, which is endemic to New Zealand. The species was first described by Frederick Hutton in 1901, and the genus was named after Carl Robert Osten-Sacken.
24+
(Source: https://en.wikipedia.org/wiki/Ostenia)
2525

2626
✨ Have a Fantastic Day! ✨
Collapse file

‎start_your_day/backend/emails.py‎

Copy file name to clipboardExpand all lines: start_your_day/backend/emails.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def __init__(self):
1818
}
1919

2020
self.recipient_list = {
21-
"email": os.getenv('RECIPIENT_EMAIL') # Get the recipient email address from environment variables
21+
"email1": os.getenv('RECIPIENT_EMAIL1'), # Get the recipient email address from environment variables
22+
"email2": os.getenv('RECIPIENT_EMAIL2') # Get the recipient email address from environment variables
2223
}
2324

2425
self.sender_credentials = {
@@ -166,7 +167,7 @@ def send_email(self):
166167
message = EmailMessage()
167168
message['Subject'] = f"🌞 Daily Digest - {datetime.datetime.now().strftime('%d %B %Y')} 🌞"
168169
message['From'] = self.sender_credentials['email']
169-
message['To'] = self.recipient_list['email']
170+
message['To'] = ', '.join(self.recipient_list.values()) # since we have multiple recipients, we join them with a comma
170171

171172
# Add plain text and HTML content
172173
message_body_text, message_body_html = self.format_email()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.