=== SentWatch – Email Uptime Monitoring ===
Contributors: pianoweb
Tags: email, monitoring, uptime, reliability, smtp, heartbeat, deliverability
Requires at least: 5.3
Tested up to: 6.9
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Monitor WordPress email delivery with instant notifications when problems occur.

== Description ==

SentWatch monitors WordPress email delivery reliability with instant notifications when problems occur.

The plugin sends periodic "heartbeats" to our monitoring service. If these signals stop arriving, it means your site has stopped sending emails (SMTP issues, plugin conflicts, server problems), and we notify you immediately.

**Key Features:**

* **Hybrid Heartbeat System** - Uses HTTP API with email fallback for maximum reliability
* **Automatic Time Sync** - Plugin synchronizes with server time to prevent false alarms
* **Instant Notifications** - Get alerts immediately when email delivery fails
* **Zero Configuration** - Just enter your API key and you're done
* **Lightweight** - No performance impact on your site (runs in background)
* **Smart Scheduling** - Heartbeats are automatically aligned with server expectations

**How It Works:**

1. Plugin sends a "heartbeat" signal at regular intervals
2. Our server tracks when heartbeats arrive
3. If a heartbeat is missed, we verify your site is reachable
4. If the issue persists, you receive an instant email notification

**Subscription Plans:**

* **Free** - 1 site, 24-hour monitoring interval
* **Silver** - 10 sites, 12-hour interval
* **Gold** - 50 sites, 6-hour interval
* **Platinum** - 200 sites, 3-hour interval

**Note:** This plugin requires a free account on [SentWatch](https://panel.sentwatch.com/register.php).

== External Services ==

This plugin connects to the SentWatch monitoring service to provide email delivery monitoring functionality.

**Service Provider:** SentWatch (operated by PianoWeb)
**Service URL:** https://panel.sentwatch.com

**What data is transmitted:**

1. **During initial setup** - When you connect the plugin with your API key:
   - Site URL
   - Site name
   - WordPress version
   - PHP version
   - Plugin version

2. **During periodic heartbeats** - Sent via email at intervals determined by your plan (every 3-24 hours):
   - Timestamp
   - Site URL
   - Plugin version

3. **During status checks** - When you view the plugin settings page or when the plugin syncs configuration:
   - Site UUID (unique identifier)
   - API Key (for authentication)

**When data is sent:**
- On initial plugin activation and setup
- Periodically via scheduled email heartbeats (frequency depends on your subscription plan)
- When you manually test email delivery
- When the plugin checks for configuration updates (daily)

**Why this data is sent:**
This data is necessary for the monitoring service to track whether your WordPress site is successfully sending emails. If heartbeat emails stop arriving, the service alerts you that your site's email functionality may be broken.

**Legal:**
- Terms of Service: https://panel.sentwatch.com/terms.php
- Privacy Policy: https://panel.sentwatch.com/privacy.php

By using this plugin, you acknowledge that your site will communicate with the SentWatch service as described above.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/sentwatch` directory, or install directly through WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings > SentWatch** and enter your API Key from your SentWatch dashboard.
4. Click "Save & Activate" - monitoring starts automatically!

== Frequently Asked Questions ==

= Is it free? =
Yes, the basic monitoring plan (1 site, 24-hour interval) is free forever.

= How does it work? =
The plugin sends heartbeat signals via HTTP API (with email fallback). Our servers track these signals and alert you if they stop.

= What happens when my email stops working? =
You'll receive an instant notification email (sent from our servers, not your site) so you can fix the issue immediately.

= Does it affect my site's performance? =
No. The plugin runs a lightweight background task that takes milliseconds to complete.

= What if my server's clock is wrong? =
The plugin automatically syncs with our server time to prevent false alarms from clock drift.

== Screenshots ==

1. Plugin settings page - simple API key configuration
2. SentWatch dashboard showing monitored sites

== Changelog ==

= 1.0.0 =
* Initial release
* Email-based heartbeat monitoring system
* Automatic time synchronization with server
* Smart schedule alignment based on subscription plan
* Simple admin settings page with connection status
* REST API endpoints for remote monitoring and configuration sync
