Prerequisites
- A Groundmail account with a verified sending domain.
- For SMTP: an SMTP credential. In the Groundmail dashboard, open SMTP and choose Create SMTP credential. The password (
gmsmtp_…) is shown once, so copy it. See SMTP relay. - Admin access to the WordPress site.
- For the Groundmail plugin: an API key. In the Groundmail dashboard, open API Keys and create one; a send-only key is enough.
- For SMTP: WP Mail SMTP or FluentSMTP installed.
Everything WordPress sends through Groundmail goes out as transactional email, so use it for account, order and notification email. Send opt-in newsletters through the API with category: "newsletter" once your account is approved, and never send cold email.
Option 1: the Groundmail plugin
The plugin sends over HTTPS with the Groundmail API, so it works on hosts that block SMTP ports.
- In WordPress, go to Plugins, then Add New, search for Groundmail, then click Install Now and Activate.
- Go to Settings, then Groundmail, and paste your API key. To keep the key out of the database, add it to
wp-config.phpinstead:
define( 'GROUNDMAIL_API_KEY', 'gm_your_key' );- Set From email to an address on your verified domain, such as
wordpress@yourdomain.com, and set From name. Turn on Force From if other plugins set their own sender. - Click Save Changes. The plugin checks the key with Groundmail when you save it.
- Send a test email from the same page to
delivered@simulator.groundmail.dev.
Until it has an API key the plugin does nothing, and WordPress sends email the way it did before. The optional send log on the settings page lists the last 50 emails with their result, never their content.
Option 2: WP Mail SMTP
- In WordPress, go to WP Mail SMTP, then Settings, and open the General tab.
- Set From Email to an address on your verified domain, for example
wordpress@yourdomain.com, and check Force From Email so every message uses it. The from address must be on a verified domain. - Set From Name to your site or brand name.
- Choose Other SMTP as the Mailer, then fill in:
| WP Mail SMTP field | Value |
|---|---|
| SMTP Host | smtp.groundmail.dev |
| Encryption | TLS |
| SMTP Port | 587 |
| Authentication | On |
| SMTP Username | groundmail |
| SMTP Password | Your SMTP credential (gmsmtp_…) |
- Click Save Settings.
WP Mail SMTP describes port 587 as the TLS option. That is the STARTTLS connection Groundmail expects. Don't choose SSL or port 465.
Option 3: FluentSMTP
- In WordPress, go to Settings, then FluentSMTP. If you already have a connection, open Settings and choose Add Another Connection.
- Select Other SMTP as the method.
- Under sender settings, set From Email to an address on your verified domain and set From Name.
- Under SMTP server settings, enter
smtp.groundmail.devas the host and587as the port, and choose STARTTLS (labelled TLS in most plugins) for encryption. Turn Authentication on, then entergroundmailas SMTP Username and your SMTP credential (gmsmtp_…) as SMTP Password. - Click Save Connection Settings.
FluentSMTP's documentation for this method names the sender and authentication fields but not the host, port and encryption fields, so match those to the labels you see. FluentSMTP stores credentials encrypted in the database by default (Store Access Keys in DB), or reads them from constants in wp-config.php if you choose Access Keys in Config File.
Test it
Groundmail's simulator addresses work over SMTP and never reach a real inbox. In WP Mail SMTP, go to WP Mail SMTP, then Tools, and open the Email Test tab. Enter this in Send To and click Send Email:
delivered@simulator.groundmail.devWP Mail SMTP shows a success message when the server accepts the message. Then confirm in Groundmail: open Emails in the dashboard, or run:
curl "https://api.groundmail.dev/emails?limit=5" \
-H "Authorization: Bearer $GROUNDMAIL_API_KEY"The email appears with the status delivered and "test": true. Use bounce@simulator.groundmail.dev to see a hard bounce. The full list is in Testing. Finally, send a test to your own address to check how it lands in a real inbox.
WooCommerce
WooCommerce sends order and account emails with wp_mail(), so once the Groundmail plugin or your SMTP plugin is connected as above, every WooCommerce email goes through Groundmail.
Match the sender. Go to WooCommerce, then Settings, then Emails, and set the "From" address to an address on your verified domain, such as orders@yourdomain.com. WooCommerce's documentation recommends an address that matches your site's domain, and Groundmail requires it to be on a verified domain. If your SMTP plugin has Force From Email on, use the same address there so the two don't disagree.
Test with a real order email, without emailing a customer. Create a test order in the WooCommerce admin with the billing email delivered@simulator.groundmail.dev and change its status to Completed. If the customer's "Completed order" email is enabled under WooCommerce, Settings, Emails, WooCommerce sends it through Groundmail, and it shows up under Emails in the Groundmail dashboard. Use bounce@simulator.groundmail.dev as the billing email to see a hard bounce. Delete the test orders afterwards.
Watch delivery. SMTP gives the plugin only the hand-off result. To know whether an order email was delivered, bounced or marked as spam, create a webhook for email.delivered, email.bounced and email.complained, or check the Emails page in the dashboard.
WooCommerce emails don't arrive but the plugin test works. Check the WooCommerce "From" address is on your verified domain, and that the specific email is enabled under WooCommerce, Settings, Emails.
Troubleshooting
Authentication failed. The username must be exactly groundmail, and the password must be the SMTP credential (gmsmtp_…), not an API key (gm_…). Create a new credential in the dashboard under SMTP if you lost it.
Connection timed out or refused. Check the host is smtp.groundmail.dev, the port is 587 and encryption is TLS, not SSL. Some hosts block outgoing SMTP connections; ask your host to allow port 587 if the test fails to connect.
The message is rejected because of the From address. The From Email must use a verified domain on your account. Until then you can only send from the sandbox sender, and only to your own account email. Turn on Force From Email if another plugin overrides the sender.
A recipient never receives the email. The address may be on your suppression list, usually after a hard bounce. List suppressions with GET /suppressions (needs a full-access API key) and see Suppressions. To get notified about bounces, create a webhook.
Sends are deferred. A new account has a daily ramp-up limit, and the Free plan has a daily limit. The relay replies with a temporary error and a retry time, and your site's SMTP client keeps trying. See Sending limits.
Other ecommerce platforms
Running a store on something other than WooCommerce? These guides cover the same setup, from the sender address to a test order:
- Magento and Adobe Commerce
- PrestaShop
- OpenCart
- Shopware
- Sylius
- Drupal Commerce
- Vendure
- Saleor
- BigCommerce
- nopCommerce