List email logs 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 →List email logs
Read-onlyReturns a paginated, filterable list of the site's logged email send attempts.
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 queries SureMail's email log database and returns entries with sender, recipient(s), subject, delivery status (sent, failed, pending, or blocked), the connection used, and send date, ordered newest first. Results can be filtered by status, a start_date/end_date range, or a free-text search across subject and recipient, and are paginated with a configurable page size (default 20, max 100). An AI assistant uses this to investigate delivery issues or to collect log IDs before calling resend-email or delete-email-logs.
See it in action
You ask your AI assistant
"Show me the 10 most recent failed emails from the last 7 days."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| status | string | No | Filter by delivery status. One of: sent, failed, pending, blocked. |
| start_date | string | No | Include only logs on or after this date (YYYY-MM-DD). |
| end_date | string | No | Include only logs on or before this date (YYYY-MM-DD). Defaults to start_date if omitted. |
| search | string | No | Free-text search across subject line and recipient email address. |
| page | integer | No | Page number, 1-based. Defaults to 1. |
| per_page | integer | No | Number of results per page. Minimum 1, maximum 100. Defaults to 20. |
Returns
An object with a logs array (each entry containing id, email_from, email_to, subject, status, connection, and created_at), a total count, and total_pages.
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 delivery statistics
Returns aggregate sent/failed email counts and a daily breakdown for a given date range.