MaiElf — all your email accounts, one brain
=============================================

MaiElf watches ALL your email accounts (Gmail, Yahoo, Outlook, Titan,
Purelymail — anything with IMAP), uses AI to sort and summarize every message,
and gives you:

  * instant Telegram alerts for mail that matters (clients, money, security
    codes, VIP people)
  * a twice-daily summary: what needs you, what you owe replies to, and who
    has NOT replied to mail you sent
  * a dashboard with charts, search across every account, AI-written reply
    drafts, an unsubscribe center, and a full Help tab
  * an optional Telegram assistant you can text: "anything urgent today?",
    "summarize the last 5 emails from John and give me an action list",
    "book a meeting Tuesday at 8 with John and Mike" (sends a calendar file
    you tap to add)

Everything runs on YOUR computer. Reading never changes your mailboxes, and
nothing is ever sent on your behalf. The optional cleanup tools (sweep,
labels, mark-as-read) only run when you click them.


CHOOSE YOUR AI (one time)
-------------------------
Option A — free, local, private (recommended):
  1. Install Ollama:  https://ollama.com/download
  2. In Command Prompt run:  ollama pull qwen2.5:7b-instruct
     (~4.7 GB download; a GPU with 8+ GB memory is recommended)

Option B — cloud AI: in the dashboard's Settings > AI engine, pick OpenAI,
Claude, Gemini, Grok, DeepSeek, Groq, or OpenRouter. The screen tells you
exactly where to create that provider's API key. Paid per use (email triage
is pennies), no GPU needed.


GETTING STARTED
---------------
1. Put MaiElf.exe in any folder (it keeps its settings next to itself).
2. Double-click MaiElf.exe — your browser opens the dashboard.
   (Windows may show a SmartScreen warning the first time: click
   "More info" -> "Run anyway".)
3. Open the HELP tab in the dashboard — it walks you through everything:
   adding accounts (including the Gmail/Yahoo app-password steps and the
   one-click Microsoft sign-in), connecting Telegram with @BotFather,
   running your first scan, and turning on the automatic schedule.

That's it. Alerts and digests arrive in Telegram; the dashboard is at
http://127.0.0.1:3737 whenever you want it.


UNINSTALL
---------
Delete the MaiElf folder, then in Command Prompt:
  schtasks /Delete /F /TN maielf-poll
  schtasks /Delete /F /TN maielf-digest-am
  schtasks /Delete /F /TN maielf-digest-pm
and delete "maielf-dashboard.bat" / "maielf-assistant.bat" from your
Startup folder (Win+R -> shell:startup).


PRIVACY & SECURITY
------------------
* Your passwords, bot tokens, and API keys are stored ENCRYPTED, tied to your
  Windows account — a thief who copies the folder or steals the disk gets
  unreadable ciphertext.
* Stored email bodies are encrypted too. Subjects, senders, and AI summaries
  stay searchable; full message text is ciphertext on disk.
* Mail data lives only in the "data" folder next to MaiElf.exe. The dashboard
  is reachable only from this computer.
* With Ollama, no email content leaves your machine except the alert/digest
  text sent to YOUR OWN Telegram bot. With a cloud AI provider, message text
  is sent to that provider for analysis.
* Recommended: turn on Windows Device Encryption (Settings > Update &
  Security > Device encryption) and use a strong Windows login password —
  MaiElf's encryption is anchored to your Windows account.
