Skip to content

Commit 72d153e

Browse files
committed
Newsletter emails: extract HTML templates, light TechHub theme, remove dead roundup pipeline
- Extract inline HTML email bodies into 3 embedded resource templates (weekly digest, daily overview, admin status report) - Switch to light TechHub theme: soft grey card (#f6f8fa) with deep brand-purple header (#1f1144), works well in both Outlook light and dark reading panes - Darken link color to #321873 for AAA contrast on the light card - Configure AdminReportEmailAddress - Remove unused SendRoundupNewsletterAsync / SendTestEmailAsync pipeline, the roundup template, and the corresponding tests
1 parent 589baa1 commit 72d153e

10 files changed

Lines changed: 165 additions & 394 deletions

File tree

src/TechHub.Api/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
"WebsiteBaseUrl": "",
427427
"CheckIntervalMinutes": 30,
428428
"UnsubscribeSecret": "",
429-
"AdminReportEmailAddress": "",
429+
"AdminReportEmailAddress": "whistler112@gmail.com",
430430
"DailyDigestHourLocal": 9,
431431
"DailyDigestTimeZoneId": "Europe/Brussels",
432432
"SendDelayMs": 200

src/TechHub.Core/Interfaces/INewsletterService.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ namespace TechHub.Core.Interfaces;
44

55
public interface INewsletterService
66
{
7-
Task<bool> SendRoundupNewsletterAsync(string roundupSlug, CancellationToken ct = default);
87
Task<bool> SendCombinedWeeklyAsync(IReadOnlyList<string> roundupSlugs, string? sendTargetKey = null, CancellationToken ct = default);
9-
Task<bool> SendTestEmailAsync(string roundupSlug, string recipientEmail, CancellationToken ct = default);
108
Task<bool> SendTestWeeklyAsync(IReadOnlyList<string> sections, string recipientEmail, CancellationToken ct = default);
119
Task<bool> SendTestDailyEmailAsync(IReadOnlyList<string> sections, string recipientEmail, CancellationToken ct = default);
1210
Task<bool> SendDailyOverviewAsync(DateOnly day, CancellationToken ct = default);
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta name="color-scheme" content="light" />
7+
<meta name="supported-color-schemes" content="light" />
8+
</head>
9+
<body style="margin:0;padding:0;font-family:Segoe UI,Arial,sans-serif;">
10+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0">
11+
<tr>
12+
<td align="center" style="padding:20px 8px;">
13+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:600px;background-color:#f6f8fa;border-radius:12px;overflow:hidden;border:1px solid #d0d7de;" bgcolor="#f6f8fa">
14+
<tr>
15+
<td bgcolor="#1f1144" style="background-color:#1f1144;color:#ffffff;padding:20px 28px;font-size:20px;font-weight:700;border-bottom:3px solid #7f56d9;">TechHub Daily Status Report — {Date}</td>
16+
</tr>
17+
<tr>
18+
<td bgcolor="#ffffff" style="background-color:#ffffff;color:#1f2328;padding:28px;">
19+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0">
20+
<tr>
21+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#57606a;font-size:14px;">New content items (24h)</td>
22+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#1f2328;font-size:14px;text-align:right;font-weight:600;">{NewContentItems}</td>
23+
</tr>
24+
<tr>
25+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#57606a;font-size:14px;">Failed processed URLs (24h)</td>
26+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#1f2328;font-size:14px;text-align:right;font-weight:600;">{FailedUrls}</td>
27+
</tr>
28+
<tr>
29+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#57606a;font-size:14px;">Failed background jobs (24h)</td>
30+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#1f2328;font-size:14px;text-align:right;font-weight:600;">{FailedJobs}</td>
31+
</tr>
32+
<tr>
33+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#57606a;font-size:14px;">New newsletter subscribers (24h)</td>
34+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#1f2328;font-size:14px;text-align:right;font-weight:600;">{NewSubscribers}</td>
35+
</tr>
36+
<tr>
37+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#57606a;font-size:14px;">Active subscribers</td>
38+
<td style="padding:8px 0;border-bottom:1px solid #d0d7de;color:#1f2328;font-size:14px;text-align:right;font-weight:600;">{ActiveSubscribers}</td>
39+
</tr>
40+
<tr>
41+
<td style="padding:8px 0;color:#57606a;font-size:14px;">Unconfirmed subscribers</td>
42+
<td style="padding:8px 0;color:#1f2328;font-size:14px;text-align:right;font-weight:600;">{UnconfirmedSubscribers}</td>
43+
</tr>
44+
</table>
45+
</td>
46+
</tr>
47+
</table>
48+
</td>
49+
</tr>
50+
</table>
51+
</body>
52+
</html>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta name="color-scheme" content="light" />
7+
<meta name="supported-color-schemes" content="light" />
8+
</head>
9+
<body style="margin:0;padding:0;font-family:Segoe UI,Arial,sans-serif;">
10+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0">
11+
<tr>
12+
<td align="center" style="padding:20px 8px;">
13+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:1100px;background-color:#f6f8fa;border-radius:12px;overflow:hidden;border:1px solid #d0d7de;" bgcolor="#f6f8fa">
14+
<tr>
15+
<td bgcolor="#1f1144" style="background-color:#1f1144;color:#ffffff;padding:20px 28px;font-size:20px;font-weight:700;border-bottom:3px solid #7f56d9;">TechHub Daily Overview</td>
16+
</tr>
17+
<tr>
18+
<td bgcolor="#f6f8fa" style="background-color:#f6f8fa;color:#1f2328;padding:28px;">
19+
<p style="margin:0 0 20px 0;font-size:15px;color:#57606a;">{Date}</p>
20+
{Content}
21+
<p style="margin:28px 0 0 0;font-size:12px;color:#57606a;border-top:1px solid #d0d7de;padding-top:20px;">
22+
You received this because you subscribed to TechHub newsletters.<br />
23+
<a href="{ManageUrl}" style="color:#321873;">Manage subscription</a> &nbsp;·&nbsp;
24+
<a href="{UnsubscribeUrl}" style="color:#321873;">Unsubscribe</a>
25+
</p>
26+
</td>
27+
</tr>
28+
</table>
29+
</td>
30+
</tr>
31+
</table>
32+
</body>
33+
</html>

src/TechHub.Infrastructure/Data/Resources/newsletter-roundup-template.html

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta name="color-scheme" content="light" />
7+
<meta name="supported-color-schemes" content="light" />
8+
</head>
9+
<body style="margin:0;padding:0;font-family:Segoe UI,Arial,sans-serif;">
10+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0">
11+
<tr>
12+
<td align="center" style="padding:20px 8px;">
13+
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width:900px;background-color:#f6f8fa;border-radius:12px;overflow:hidden;border:1px solid #d0d7de;" bgcolor="#f6f8fa">
14+
<tr>
15+
<td bgcolor="#1f1144" style="background-color:#1f1144;color:#ffffff;padding:20px 28px;font-size:20px;font-weight:700;border-bottom:3px solid #7f56d9;">TechHub Weekly Digest</td>
16+
</tr>
17+
<tr>
18+
<td bgcolor="#f6f8fa" style="background-color:#f6f8fa;color:#1f2328;padding:28px;">
19+
{Content}
20+
<p style="margin:28px 0 0 0;font-size:12px;color:#57606a;border-top:1px solid #d0d7de;padding-top:20px;">
21+
You received this because you subscribed to TechHub newsletters.<br />
22+
<a href="{ManageUrl}" style="color:#321873;">Manage subscription</a> &nbsp;·&nbsp;
23+
<a href="{UnsubscribeUrl}" style="color:#321873;">Unsubscribe</a>
24+
</p>
25+
</td>
26+
</tr>
27+
</table>
28+
</td>
29+
</tr>
30+
</table>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)