Fall back to html2text when no text/plain part is available,
converting HTML emails to readable terminal output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fetch full raw email and parse MIME structure to find the
text/plain part, removing MIME headers and boundaries from
the preview pane.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After refresh, find the previously selected email by its IMAP
sequence number and keep the highlight on it. Falls back to the
first email if the selected one was deleted.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tab toggles focus between inbox list and preview. Focused pane
gets a cyan border. When preview is focused, up/down scrolls the
email body instead of navigating the list.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Spawn a worker thread that owns the IMAP session and processes
fetch commands via channels. The UI thread polls for results
non-blockingly, keeping the app responsive during network operations.
Shows loading indicator while fetching.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce Inbox struct to track the oldest fetched sequence number.
When scrolling past the last email, automatically fetch the next
batch of 50 older messages and append them to the list.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support both plain and TLS IMAP connections via an ImapSession enum,
enabling use with Gmail and other TLS-only servers. Limit fetch range
to the most recent 50 messages to avoid hanging on large mailboxes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace simple IMAP login with full inbox fetch that displays
Subject, From, and Date for each message. Auto-refreshes every
30 seconds and supports manual refresh with 'r' key.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>