README.md

 1# sender
 2
 3The `sender` package handles email composition and delivery over SMTP. It constructs properly formatted multipart MIME messages and sends them through the configured SMTP server.
 4
 5## Architecture
 6
 7This package is the SMTP client layer for Matcha. It:
 8
 9- Builds multipart MIME messages with plain text, HTML, inline images, and file attachments
10- Supports S/MIME detached signing and envelope encryption using PKCS#7
11- Handles SMTP authentication with both PLAIN and LOGIN mechanisms (fallback for servers like Mailo)
12- Supports both implicit TLS (port 465) and STARTTLS (other ports)
13- Generates unique Message-IDs and handles reply threading via `In-Reply-To` and `References` headers