Get email delivery statistics is a WordPress ability from SureMail — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Get email delivery statistics
Read-onlyReturns aggregate sent/failed email counts and a daily breakdown for a given date range.
Requires the SureMail plugin installed on WordPress 6.9+ (for Abilities API support). Every ability also requires the current user to have the 'manage_options' capability. Abilities that create, modify, resend, or delete data are additionally gated behind separate site options: the destructive abilities (delete-connection, delete-email-logs) require the 'suremails_abilities_api_delete' option to be enabled, and the write abilities (add-connection, update-connection, send-test-email, resend-email, update-settings) require the 'suremails_abilities_api_edit' option to be enabled.
What it does
This ability aggregates the email log data for an inclusive date range into a total count of sent emails, a total count of failed emails, and a chart_data array with per-day sent/failed breakdowns. If end_date is omitted, it reports on the single start_date only. An AI assistant uses this to give a high-level overview of email delivery health or spot trends, without pulling individual log records (use list-email-logs for that).
See it in action
You ask your AI assistant
"Show me email delivery stats for the last 7 days, including a daily breakdown of sent vs. failed."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| start_date | string | Yes | Start date for the range (YYYY-MM-DD). |
| end_date | string | No | End date for the range (YYYY-MM-DD). If omitted, defaults to the same day as start_date. |
Returns
An object with total_sent, total_failed, and a chart_data array of per-day objects (created_at, total_sent, total_failed).
Permission
The current user must have the 'manage_options' capability.
More SureMail abilities
Add new email connection
Creates and authenticates a new email-sending connection against its provider's credentials.
Delete connection
Permanently deletes an email connection by ID, an action that cannot be undone.
Delete email logs
Permanently deletes one or more email log entries and any attachments used only by them.
Get connection details
Retrieves the full non-sensitive details of a single email connection by its ID.
Get default connection
Returns the connection that WordPress is currently using to send all outgoing emails.
Get email log details
Retrieves the full stored details of a single logged email, including its body and provider response.