Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/groundmail/groundmail-wordpress/archive/refs/heads/main.zipGroundmail for WordPress
The official Groundmail plugin for WordPress. It sends every email WordPress and its plugins send with wp_mail() (password resets, new accounts, comment notifications, WooCommerce orders, contact forms) through the Groundmail email API over HTTPS.
- HTML and plain-text email, CC, BCC, Reply-To and custom headers
- Attachments and inline images
- Default or forced From email and name
- API key in the settings or in
wp-config.php(GROUNDMAIL_API_KEY) - A test email button and an optional log of the last 50 sends
- Keeps the filters and hooks other plugins rely on:
wp_mail_from,wp_mail_from_name,wp_mail_content_type,phpmailer_init,wp_mail_failed,wp_mail_succeeded
Without an API key the plugin does nothing, and WordPress sends email the way it did before.
Requires WordPress 5.7 or later and PHP 7.4 or later. Licensed GPLv2 or later.
Install
-
Upload the
groundmailfolder towp-content/plugins/(or uploadgroundmail.zipunder Plugins → Add New → Upload Plugin) and activate it. -
In Groundmail, verify your sending domain and create an API key under API Keys. A send-only key is enough.
-
In WordPress, open Settings → Groundmail, paste the key and set the From email to an address on your verified domain. Or keep the key out of the database:
// wp-config.php define( 'GROUNDMAIL_API_KEY', 'gm_your_key' ); -
Send a test email from the same page.
delivered@simulator.groundmail.devchecks the connection without emailing a real inbox.
WooCommerce sends its emails with wp_mail(), so they go through Groundmail with no extra setup. Set the WooCommerce "From" address to your verified domain, or turn on Force From.
Filters
groundmail_email_body changes the request body for one email before it is sent, for example to add tags or a category:
add_filter( 'groundmail_email_body', function ( $body, $atts ) {
$body['tags'] = array( array( 'name' => 'source', 'value' => 'wordpress' ) );
return $body;
}, 10, 2 );
groundmail_email_sent fires after Groundmail accepts an email, with its id (msg_…) and the request body.
What the plugin sends
Only to https://api.groundmail.dev, and only once an API key is set: each email (sender, recipients, subject, content, attachments, custom headers) to POST /emails, and a key check (GET /emails?limit=1) when you save a new key. See the terms and privacy policy.
Development
composer install
composer test # unit tests, no WordPress needed
bin/build-zip.sh # dist/groundmail.zip, the files that ship
tests/e2e/run.py runs the plugin in a real WordPress against a local mock of the API; see the top of that file.