I built an AI email assistant in .NET with SerpApi and a local LLM. Here’s what broke.
说明与用途
作者创建了一个 .NET 控制台应用程序,读取 Gmail,过滤批量邮件,用本地 LLM 生成回复草稿,并通过 SerpApi 查询发件人公司信息,保持邮件内容本地化且不自动发送。
问题
The author had 53 unread emails, many of which were newsletters or automated notifications, and needed a way to identify important messages and draft replies without sending anything automatically.
结果
The assistant successfully filtered bulk mail, avoided sending to no‑reply addresses, and reduced SerpApi usage by only querying relevant emails. Draft replies and company summaries were generated locally, keeping email content private.
工作流
- Read Gmail via IMAP (MailKit)
- Filter out bulk/automated emails using List-Unsubscribe header and address heuristics
- Send remaining emails to local LLM (Ollama) to get category, summary, and draft reply
- Extract sender domain and query SerpApi with google_light engine
- Use LLM to summarize company info from SerpApi results
- Output draft reply and company summary to console
证据
I built a small .NET console app that reads my inbox, skips the noise, drafts replies for the emails that matter, and tells me who the sender's company actually is.
It never sends anything. It drafts; I decide.
My email content stays on my machine. The language model runs locally with Ollama.
Most of a real inbox doesn’t need AI at all. Bulk mail usually carries a List-Unsubscribe header, and automated senders follow predictable patterns.
Once the filter was in, most of the inbox never reached the model. That’s when it clicked for me: the AI was the smaller part of the job.
- 记录日期: 2026-10-25T12:11:30.376Z