# Daily Tech Digest — HTML Email with Clickable Links
The digest script at `/root/.hermes/scripts/daily-feed-summary.py` historically sent as **plain text** — markdown links `[title](url)` were not clickable.
## Fix: multipart MIME with HTML conversion
Convert the markdown body to HTML before sending:
```python
import re
html_body = re.sub(r'\[([^\]]+)\]\(([^)]+)\)',
r'\1', body)
html_body = re.sub(r'\*\*([^*]+)\*\*', r'\1', html_body)
html_body = re.sub(r'_([^_]+)_', r'\1', html_body)
html_body = re.sub(r'^## (.+)$', r'
\1
', html_body, flags=re.MULTILINE)
html_body = re.sub(r'^# (.+)$', r'\1
', html_body, flags=re.MULTILINE)
html_body = re.sub(r'^---+$', r'
', html_body, flags=re.MULTILINE)
```
Send as `MIMEMultipart('alternative')` — attach both the original plain text AND the converted HTML. Email clients render the HTML version if supported, fall back to plain text otherwise.
```python
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
msg = MIMEMultipart('alternative')
msg.attach(MIMEText(body, 'plain', 'utf-8'))
msg.attach(MIMEText(html, 'html', 'utf-8'))
```
## Permanence
This only applies to scripts that generate markdown-rich content for email. Simple notification emails (cron alerts, bounce checks, inbox summaries) don't need HTML — plain text is fine and faster.