This is a submission for the https://dev.to/challenges/hacktoberfest-weekend-2026-10-01
OffMail
My friend Arpit sends dozens of LinkedIn connection requests every week to recruiters, founders, and potential collaborators. The problem was never finding people to connect with. The problem was following up after they accepted.
Like many professionals, he would receive a LinkedIn "accepted your invitation" notification, think "I'll reply later", and then never actually do it. By the time he remembered, the opportunity had gone cold.
Existing AI email tools could automate parts of this workflow, but they came with trade-offs:
Your emails are processed on someone else's servers
Monthly subscription costs add up quickly
AI-generated drafts depend on external APIs
You can't verify what happens to your data
So I built OffMail.
OffMail is a local-first AI assistant that:
Reads Gmail Social category emails locally
Detects LinkedIn connection acceptance notifications
Generates a personalized follow-up draft using Gemma 3 1B
Lets the user review and edit the draft
Sends the approved message through LinkedIn's reply-to email routing, causing it to appear as a LinkedIn DM
Most importantly:
The user's inbox never leaves their machine.
There is no central backend, no cloud AI provider, and no external data processing service. Everything runs locally using open-source software. -->
Demo
Code
GitHub Repository:https://github.com/Qisanxi/Offmail
How I Built It
The challenge specifically encouraged participants to explore open innovation and open-source AI. I wanted the AI component to be genuinely useful while remaining completely under the user's control.
Open-Source AI Stack
Model: Gemma 3 1B
Runtime: Ollama
Inference: 100% local
Instead of using a hosted LLM API, OffMail runs Gemma directly on the user's laptop through Ollama.
The workflow looks like this:
- Gmail Social Inbox Collection
OffMail uses Gmail's IMAP support and the X-GM-RAW search extension to retrieve Social-category emails.
This allows the application to identify notifications such as LinkedIn connection acceptances without relying on external inbox services.
- Local Classification
Before invoking the language model, emails are classified using a sender-aware regex engine.
Categories include:
linkedin_accepted
needs_reply
fyi
unknown
This avoids wasting model inference on emails that clearly don't need a response.
- Local Draft Generation
When a user selects an email and clicks "Generate Draft":
Email context is sent to Ollama
Gemma 3 1B generates a response
Draft is stored locally in SQLite
User reviews the response before approval
The model never communicates with external servers.
- Human-in-the-Loop Approval
I intentionally avoided full automation.
Users can:
Review drafts
Edit tone and wording
Regenerate drafts
Approve only messages they want sent
This keeps the user in control while eliminating most of the repetitive writing effort.
- Offline-First Delivery Queue
Approved drafts enter a local queue.
A background sender:
Sends messages through Gmail SMTP
Handles connectivity failures
Uses exponential backoff retries
Prevents duplicate sends through atomic queue operations
Even if the laptop temporarily loses internet access, drafts remain safely queued.
Security Considerations
The project includes several defensive mechanisms:
Bound to 127.0.0.1
TrustedHostMiddleware protection
Per-install authorization token
Header injection protection
Sender-restricted LinkedIn routing
Local SQLite storage only
Because email data is highly sensitive, security and privacy were treated as first-class requirements rather than afterthoughts. -->
Why Does Open Innovation Matter?
<!-- OffMail exists because open innovation made it possible.
If I had built this using a closed AI API, the project would immediately inherit several limitations:
Closed AI Approach OffMail's Open ApproachRecurring API costs Zero inference cost after setup
User email data sent to third parties Data remains on-device
Fixed model choice Any Ollama-compatible model can be used
Vendor lock-in Fully portable and auditable
Requires internet connectivity Draft generation works offline
Being able to run Gemma 3 1B locally changed the entire product design.
Instead of asking:
"How do I securely send user data to an AI provider?"
I was able to ask:
"How do I make sure user data never leaves the device at all?"
That's the power of open-weight models.
Open innovation didn't just reduce cost. It enabled a fundamentally different privacy model.
Users can inspect the code, replace the model, modify the prompts, and even fork the project for their own workflow.
That level of ownership simply isn't possible with most closed AI services.
Prize Categories
Best Use of Gemma
OffMail uses Gemma 3 1B running locally via Ollama to generate personalized follow-up drafts without requiring external AI APIs.
✅ Build for a Friend
The project was built specifically for my friend Arpit, who regularly loses opportunities because replying to new LinkedIn connections creates just enough friction to be postponed indefinitely.
OffMail removes that friction while preserving privacy and user control
What started as a simple solution for a friend became an experiment in how powerful local AI workflows can be.
The most exciting part wasn't generating email drafts.
It was realizing that modern open-weight models are good enough to solve real problems without sending personal data to the cloud.
OffMail is my attempt to prove that useful AI doesn't need to come packaged with subscriptions, telemetry, or privacy trade-offs.
Sometimes all it needs is a laptop, an open model, and a friend with a problem worth solving.

Top comments (0)