wp_mail in sandbox mode.
Prerequisites
Use a staging WordPress site, a verified sending domain, admin access and a Sandbox API v1 credential from the AhaSend Credentials page. Plugin 1.3 calls the legacy v1 endpoint; an API v2 key will not work. Use SMTP credentials if you instead choose a general WordPress SMTP plugin. The WordPress plugin listing gives current compatibility information. Version 1.3 uses a must-use plugin to replacewp_mail; test your site’s other mail plugins for conflicts before changing production settings.
Install and Configure the Plugin
- In WordPress, go to Plugins → Add New Plugin and search for AhaSend Email API. Install and activate the plugin published by AhaSend.
- Open AhaSend Email in the main admin menu (
admin.php?page=ahasend-email-api). Fill in API Key, From Email and From Name. The sender must use your verified domain. Save the settings. - Visit an admin page after activation so the plugin can create
wp-content/mu-plugins/ahasend-mu-mailer.php. The server must be allowed to write to that directory. - Confirm the saved key is a sandbox v1 credential. This plugin has no request-level sandbox switch.
ahasend-test.php outside the public web directory. With WP-CLI installed, run wp eval-file /path/to/ahasend-test.php from your WordPress root.
ahasend-test.php
wp_mail returns false. The plugin treats a successful HTTP response as success; check the corresponding message in AhaSend before treating the integration as working.
Prepare the Production Site
Keep the sandbox key on staging. After testing, create a separate domain-restricted v1 production credential and save it on the live site only. Limit access to plugin settings and WordPress database backups, which contain the saved key. Review key security. Trigger the real workflows your site needs, such as password resets and purchase receipts. The 1.3 replacement handles simple recipients, subject and message content; it does not forward everywp_mail header or its attachment argument. Do not assume CC, BCC or attachments work through this plugin. Keep those workflows on a tested SMTP integration if needed.
Use an application job record to avoid duplicate receipts if a request times out, and check delivery events after API acceptance. When replacing this plugin, deactivate it normally and confirm its must-use mailer file was removed; deleting only the main plugin folder can leave the mail override behind.

