=== Dragon Email Log ===
Contributors: dragoncore
Tags: email, log, mail, debug, smtp
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Log all outgoing WordPress emails with a clean admin interface. Debug email issues, track delivery, and never wonder if an email was sent again.

== Description ==

Dragon Email Log captures and logs every email sent from your WordPress site. Perfect for debugging email delivery issues, tracking notifications, and maintaining a record of all outgoing communications.

= Features =

* **Log All Emails** - Automatically captures every email sent via wp_mail()
* **View Email Content** - See the full email body, headers, and attachments
* **Track Delivery Status** - Know whether emails were sent successfully or failed
* **Identify Sources** - See which plugin, theme, or WordPress core sent each email
* **Search & Filter** - Quickly find emails by recipient, subject, status, or source
* **Dashboard Stats** - At-a-glance statistics for sent, failed, and total emails
* **Automatic Cleanup** - Configurable retention period to automatically delete old logs
* **Privacy Options** - Option to disable body logging for sensitive sites

= Use Cases =

* Debug email delivery issues
* Verify that form submissions are sending emails
* Track WooCommerce order notifications
* Monitor user registration emails
* Audit email communications
* Test SMTP configurations

= Pro Features (Coming Soon) =

* Resend failed emails
* Export logs to CSV/JSON
* Advanced date range filters
* Slack/webhook notifications on failure
* SMTP diagnostics
* Email templates library

== Installation ==

1. Upload the `dragon-email-log` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to Tools > Email Log to view your email logs

== Frequently Asked Questions ==

= Does this plugin slow down my site? =

No. The plugin hooks into the email sending process with minimal overhead. Logging is performed efficiently and won't impact your site's performance.

= Does this work with SMTP plugins? =

Yes! Dragon Email Log works with any plugin that sends email through WordPress's wp_mail() function, including WP Mail SMTP, Post SMTP, and others.

= Can I disable body logging for privacy? =

Yes. Go to Settings and disable "Log Email Body" to only capture metadata (recipient, subject, headers) without the email content.

= How long are logs retained? =

By default, logs are retained for 30 days. You can change this in Settings or set it to 0 to keep logs indefinitely.

= Where are the logs stored? =

Logs are stored in your WordPress database in a custom table. They are automatically cleaned up based on your retention settings.

== Screenshots ==

1. Dashboard with email statistics
2. Full email log list with filtering
3. Single email view with headers and body
4. Settings page

== Changelog ==

= 1.0.0 =
* Initial release
* Log all outgoing emails
* Dashboard with statistics
* Search and filter functionality
* Email detail view
* Configurable retention
* Automatic cleanup cron

== Upgrade Notice ==

= 1.0.0 =
Initial release.
