Commit Graph

5 Commits

Author SHA1 Message Date
279f8c50e7 feat: show recipient & AI-generated subject in summary
- AI now generates a concise subject title (not copy original)
- AI prompt includes recipient field in JSON schema
- Telegram message shows recipient and uses AI-generated title
2026-07-02 20:05:16 +08:00
a6817d3e11 feat: add retry(10) on all network requests
- New src/retry.py with configurable retry decorator
- Applied @retry() to fetch_unseen_emails, mark_as_seen,
  summarize_email, and send_message
- No backoff delay between retries
2026-07-02 20:02:03 +08:00
89149b506c fix: add IMAP ID command for 126.com/163.com support
These providers require a client identification (ID command, RFC 2971)
before SELECT INBOX, otherwise they reject with 'SELECT Unsafe Login'.
Extract shared login+select logic into _login_and_prepare helper.
2026-07-02 19:56:14 +08:00
82403de6df fix: check IMAP select() return status before issuing commands
- Add _select_mailbox helper that raises on non-OK status
- Prevents 'command SEARCH illegal in state AUTH' by catching
  failed mailbox selection early with a clear error message
2026-07-02 19:53:26 +08:00
e2826a3e3b feat: init AI email summarization bot
- Multi-account IMAP email polling with UID tracking
- DeepSeek API integration with JSON Mode structured output
- Telegram notification with formatted MarkdownV2 message
- YAML config with dataclass-based type validation
- Graceful shutdown on SIGINT/SIGTERM
- 60s default polling interval
2026-07-02 19:45:34 +08:00