Skip to main content
All email endpoints are available since v1.4.0.

GET /email/settings

Returns the current SMTP configuration. The stored password is masked and never returned in plain text.
curl -X GET https://example.com/wp-json/wp-manager-pro/v1/email/settings \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

settings
object

POST /email/settings

Saves SMTP configuration. If the password field is •••••••• or omitted, the existing stored password is kept unchanged.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/email/settings \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "host": "smtp.example.com", "port": 587, "username": "[email protected]", "password": "secret", "encryption": "tls", "from_email": "[email protected]", "from_name": "My Site"}'

Parameters

enabled
boolean
Enable or disable SMTP routing for all outgoing WordPress email.
host
string
SMTP server hostname (e.g. smtp.gmail.com).
port
integer
SMTP port. Common values: 587 (STARTTLS), 465 (SSL), 25 (plain). Defaults to 587.
username
string
SMTP authentication username.
password
string
SMTP authentication password. Pass •••••••• or omit this field to keep the existing password.
encryption
string
Encryption method: none, ssl, or tls. Defaults to tls.
from_email
string
Override the sender email address for all outgoing mail.
from_name
string
Override the sender display name for all outgoing mail.

Response

success
boolean
Always true.
settings
object
The saved settings object with the password masked.

POST /email/test

Sends a test email to verify that the SMTP configuration is working.
curl -X POST https://example.com/wp-json/wp-manager-pro/v1/email/test \
  -H "X-WP-Nonce: YOUR_NONCE" \
  -H "Content-Type: application/json" \
  -d '{"to": "[email protected]"}'

Parameters

to
string
required
Recipient email address for the test message.

Response

success
boolean
true if wp_mail() returned successfully.
message
string
Confirmation or error message.

GET /email/log

Returns a paginated list of sent and failed email attempts logged by the plugin.
curl -X GET "https://example.com/wp-json/wp-manager-pro/v1/email/log?page=1&per_page=50" \
  -H "X-WP-Nonce: YOUR_NONCE"

Parameters

page
integer
Page number. Defaults to 1.
per_page
integer
Results per page. Defaults to 50, maximum 200.
status
string
Filter by status: sent or failed. Omit to return all entries.

Response

emails
array
total
integer
Total log entries.
page
integer
Current page.
per_page
integer
Results per page.
total_pages
integer
Total pages.

DELETE /email/log/clear

Permanently deletes all email log entries.
This truncates the entire email log table. All history of sent and failed emails is removed.
curl -X DELETE https://example.com/wp-json/wp-manager-pro/v1/email/log/clear \
  -H "X-WP-Nonce: YOUR_NONCE"

Response

success
boolean
Always true on success.

Build docs developers (and LLMs) love