refactor(mail): remove fake/dead protocol code #262

Merged
KofTwentyTwo merged 1 commits from story/m6-remove-fake-protocol-code into dev 2026-07-31 15:05:49 +00:00
1 Commits
Author SHA1 Message Date
James Maes c990348e84 refactor(mail): remove fake/dead protocol code paths
Delete crates/nuncio-cal/src/carddav.rs, an orphaned duplicate
CardDavClient/Contact that made no network call and was unused outside
its own tests -- the real CardDAV client lives in nuncio-contacts.

Make credential-less ImapEngine/JmapEngine sync_folders/sync_messages
return an honest MailError::AuthError instead of returning hardcoded
folders/messages. This also fixes a latent bug in ImapEngine::sync_folders:
a genuinely empty real mailbox list previously fell through to fake
canned folders instead of being returned as-is.

Remove send_email from the MailBackend trait: production sends route
through MessageSender/SmtpTransportEngine exclusively, and the IMAP/JMAP
implementations were both no-op fabricated successes with no real
transport behind them.

Migrate the tests that exercised the removed fixture paths to real
fixtures: a scripted loopback IMAP server drives ImapEngine::sync_folders
through a real LOGIN/LIST/LOGOUT exchange, and credential-less calls are
now asserted to fail honestly rather than fabricate data.

Refs #253
2026-07-31 10:02:29 -05:00