How I Built a Reddit Email Digest to Stop the Morning Scroll
Every morning I opened Reddit to “catch up.” One subreddit led to another. Half an hour later I had more tabs, not more clarity. I was not informed. I was distracted.
That loop pushed a simple question: what if the highlights came to me instead of me chasing them?
That question became Mailius.

What Mailius does
Mailius is a side project I built in my free time. It pulls top posts from the subreddits you configure, organizes them, and sends a single email digest. You open your inbox, skim structured sections, and you are done in minutes. No infinite scroll.
The product surface is simple. Under it: scraping, summarization, templating, and delivery as separate concerns so each piece can change without breaking the rest.
Why I built it (beyond Reddit)
Scrolling was the trigger. The real goal was practice.
I wanted an architecture I could explain in one breath: fetch, summarize, render, send. Swap Mailgun for another provider later, or add a second content source beside Reddit, and the boundaries should still hold.
It was an exercise in clarity, structure, and discipline when nobody was asking for a demo.
What happens behind the scenes
End-to-end flow:
- Fetch: Top posts from configured subreddits via praw (Python wrapper for Reddit’s API).
- Summarize: Posts condensed so a digest stays skimmable (OpenAI in the stack).
- Render: HTML and plain-text bodies from Jinja2 templates (
.j2), presentation kept out of business logic. - Send: Outbound email through Mailgun (delivery + logs).
Optional extras (e.g. affirmations or other APIs) go through requests where needed. Secrets live in .env via python-dotenv. GitHub Actions runs the job on a daily schedule so the digest ships without you opening the app.
Stack (one job per tool)
| Tool | Role |
|---|---|
| praw | Reddit API |
| Jinja2 | Email HTML + text templates |
| Mailgun | Delivery and observability |
| requests | Extra HTTP content (affirmations, APIs) |
| python-dotenv | Local and CI secrets |
| OpenAI | Summarization layer |
| Github Actions | Scheduled daily run |
Modular by intent: each dependency maps to one layer, not a grab bag script.
Project layout
Layered folders so responsibilities stay obvious:
mailius/
├── config/ # Settings and environment
├── emailing/ # Render + send (Jinja2 + Mailgun)
│ └── templates/ # .j2 email templates
├── services/ # Scraper, summarizer, affirmation service
├── utils/ # Shared helpers
├── main.py # Entry point
├── requirements.txt
└── README.mdmain.py orchestrates; services/ owns Reddit and summarization; emailing/ owns templates and Mailgun. New features tend to land in one folder instead of spreading across the tree.
Why side projects like this matter
Mailius is not a launch post. It is a personal build.
That is still useful signal: how you structure code when there is no ticket queue, how you split concerns when you could hack it in one file, and whether you finish something small enough to run every morning.
No deadline, no pitch deck. Just a annoyance, a question, and a pipeline you can rerun tomorrow.
Try it yourself
Repo: Mailius on GitHub
Clone it, set subreddits and API keys in .env, and trigger a run locally before you trust the Action schedule.