# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-03-30

### Added

#### Core SMTP Engine
- Custom SMTP mailer replacing default `wp_mail()` via `phpmailer_init` hook.
- AES-256-CBC encryption for all stored credentials using WordPress security keys.
- Support for TLS and SSL encryption protocols.
- SMTP authentication with username and password.
- Configurable From Email and From Name with force-override options.
- Return-Path header support for bounce handling.
- `wp-config.php` constant support for credentials and settings.

#### Mail Providers
- Custom SMTP server support for any provider.
- SendGrid native API integration.
- Mailgun native API integration.
- Postmark native API integration.
- Brevo (Sendinblue) native API integration.
- SparkPost native API integration.
- Gmail and Google Workspace SMTP presets.
- Outlook and Office 365 SMTP presets.
- Amazon SES SMTP presets.
- Extensible provider architecture via `MailProviderInterface`.

#### Email Logging
- Comprehensive logging of all outgoing emails (to, cc, bcc, subject, body, headers, attachments, status, error).
- Automatic source detection identifying the plugin or theme that triggered each email.
- Advanced search and filtering by status, date range, recipient, and subject.
- One-click email resend from the log viewer.
- Configurable log retention with automatic cleanup via daily cron.
- Bulk delete and export capabilities.

#### Setup Wizard
- Guided first-run configuration wizard with provider selection.
- Pre-filled settings for each supported provider.
- Connection test step with real-time feedback.
- Automatic redirect after plugin activation.

#### Dashboard
- Real-time email statistics: sent, failed, and queued counts.
- Delivery success rate percentage display.
- Recent email activity feed.
- System health indicators.

#### Failure Notifications
- Email notification channel for failure alerts.
- Slack webhook integration.
- Discord webhook integration.
- Telegram bot integration.
- Configurable notification triggers and thresholds.
- Notification history with delivery status tracking.

#### Multi-Connection Support
- Multiple simultaneous mail provider connections.
- Automatic failover to backup connections on send failure.
- Connection health monitoring and success rate tracking.
- Per-connection configuration and status management.

#### Routing Rules
- Conditional email routing based on recipient address.
- Routing by recipient domain.
- Routing by email subject pattern matching.
- Routing by source plugin identification.
- Rule priority ordering with drag-and-drop support.
- Fallback connection when no rules match.

#### Email Queue
- Asynchronous email delivery powered by WP-Cron.
- Configurable batch processing size.
- Exponential backoff retry strategy for failed emails.
- Maximum retry limit configuration.
- Queue dashboard with real-time status monitoring.
- Manual queue flush and individual email retry controls.

#### Import / Export
- Full configuration export as JSON (settings, connections, routing rules).
- Configuration import with validation and error reporting.
- Selective import options for granular control.
- Multisite-compatible import and export.

#### Security
- Security posture scoring dashboard with actionable recommendations.
- REST API rate limiting to prevent abuse.
- Six custom WordPress capabilities for role-based access control:
  - `frumbik_smtp_manage_settings`
  - `frumbik_smtp_view_logs`
  - `frumbik_smtp_delete_logs`
  - `frumbik_smtp_send_test`
  - `frumbik_smtp_manage_connections`
  - `frumbik_smtp_manage_notifications`
- Comprehensive input sanitization and validation on all endpoints.
- Audit logging for configuration changes.
- Nonce verification on all admin actions.

#### Admin Interface
- Modern React single-page application built with TypeScript.
- State management via Zustand.
- Data fetching via TanStack React Query.
- Client-side routing via React Router.
- Real-time dashboard with statistics and charts.
- Responsive design for desktop, tablet, and mobile.
- Accessible UI following WordPress accessibility guidelines.
- Full i18n support via `frumbik-smtp` text domain.

#### Multisite
- Full WordPress Multisite support.
- Network-level or per-site configuration options.
- Network admin management panel.

#### Developer Features
- IoC container with service provider architecture.
- Full REST API covering all plugin functionality.
- PSR-4 autoloading via Composer.
- Extensive action and filter hooks for customization.
- Database migration system with version tracking.
- Singleton pattern for core services.
- PHPUnit test infrastructure.
- PHPCS with WordPress Coding Standards configuration.

[1.0.0]: https://github.com/frumbik/frumbik-smtp/releases/tag/v1.0.0
