carrier/crates/mail-mcp/src
Kayos f7e698b09f smtp: extract validate_send_input + 9 unit tests for size caps
Refactor: pull the pre-flight validation block out of send() into a
standalone validate_send_input() function. send() now starts with a
single validate_send_input(&input)? call. Behavior identical; the
extraction is purely so unit tests can exercise the validation paths
without standing up a fake SMTP server.

New tests (9):
- validate_accepts_minimal_input (the happy path)
- validate_rejects_empty_to
- validate_rejects_too_many_recipients (150 > 100 cap)
- validate_recipient_cap_boundary_passes (exactly 100 OK)
- validate_rejects_oversized_body
- validate_rejects_oversized_body_html
- validate_rejects_too_many_attachments
- validate_rejects_oversized_attachment_encoded (pre-decode bound)
- validate_accepts_at_attachment_boundary

Test count: 18 -> 27. All passing.
2026-05-21 08:23:18 -07:00
..
config.rs audit-fix round 3: LOW-1 mime cleanup, INFO-2 drop empty snippet, INFO-3 unit tests + format_imap_since tightening 2026-05-21 08:00:50 -07:00
imap.rs audit-fix round 3: LOW-1 mime cleanup, INFO-2 drop empty snippet, INFO-3 unit tests + format_imap_since tightening 2026-05-21 08:00:50 -07:00
main.rs mail-mcp v0.1 — Rust MCP server for Sulkta email 2026-05-21 06:50:25 -07:00
smtp.rs smtp: extract validate_send_input + 9 unit tests for size caps 2026-05-21 08:23:18 -07:00
tools.rs tool surface: bake link-safety default-deny into descriptions 2026-05-21 07:58:07 -07:00