# Transactional Email Delivery & SMTP Configuration

**Document Version:** 1.0.0 (Phase 15)

---

## 1. Supported Mail Providers

- **Custom SMTP (`smtp`):** Connects to any standard SMTP server (e.g. Mailgun, SendGrid, Amazon SES, Postmark, Google Workspace).
- **System Default (`system`):** Uses server environment mail configuration.

---

## 2. Configuration Attributes

| Attribute | Type | Description |
|-----------|------|-------------|
| `mail_from_name` | String | Sender display name |
| `mail_from_email` | String | Outbound sender address |
| `mail_reply_to` | String | Optional reply-to address |
| `smtp_host` | String | Hostname (e.g. `smtp.mailgun.org`) |
| `smtp_port` | Integer | Port (`587` TLS, `465` SSL, `25`) |
| `smtp_encryption` | String | `tls`, `ssl`, or `none` |
| `smtp_username` | String | SMTP account / API key user |
| `smtp_password` | Encrypted | Protected password (never returned in responses) |

---

## 3. Test Email Verification

Workspaces can execute an isolated test delivery at `/settings/email` (or `POST /api/v1/settings/email/test`) to verify credentials without triggering real lead follow-ups.
