The WordPress REST API Email Sender plugin allows you to send HTML emails via a REST API with API key authentication in WordPress. This plugin provides an endpoint to send emails with customizable sender names and reply-to addresses.
- Send HTML emails via a REST API.
- API key authentication for secure access.
- Customizable sender name and reply-to address.
- Easy-to-use settings page in the WordPress admin dashboard.
- Download the plugin zip file from the releases page.
- Go to the WordPress admin dashboard.
- Navigate to Plugins > Add New and click Upload Plugin.
- Choose the downloaded zip file and click Install Now.
- After installation, click Activate to enable the plugin.
- Go to Settings > REST API Email Sender in the WordPress admin dashboard.
- Enter your API key and save changes.
To send an email using the REST API, make a POST
request to the following endpoint:
POST https://your-wordpress-site.com/wp-json/email-sender/v1/send-email/
Content-Type: application/json
api_key: YOUR_API_KEY
{ "to": "[email protected]", "subject": "Test Email", "body": "This is a test email sent from the REST API.", "from": "[email protected]", "sender_name": "Sender Name", "reply_to": "[email protected]" }
curl -X POST https://your-wordpress-site.com/wp-json/email-sender/v1/send-email/
-H "Content-Type: application/json"
-H "api_key: YOUR_API_KEY"
-d '{
"to": "[email protected]",
"subject": "Test Email",
"body": "This is a test email sent from the REST API.",
"from": "[email protected]",
"sender_name": "Sender Name",
"reply_to": "[email protected]"
}'
[1.4] - 2024-08-10
Added support for sender name and reply-to email in the API request.
Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bugs.
This plugin is licensed under the MIT License.