Skip to main content
AhaSend’s Drupal module sends site email through the HTTP API; this guide configures the released module and tests its Mail System plugin in sandbox mode.

Prerequisites

Use a staging Drupal 10 or 11 site, Composer, Drush, a verified sending domain and a Sandbox API v1 credential. Module 1.0.0 uses the legacy v1 endpoint, so a v2 API key will not work. The project page lists its Mail System dependency and current release information.

Install and Configure the Module

From your Drupal project root:
Open Configuration → Mail → AhaSend settings at /admin/config/mail/ahasend in your Drupal site. Save the sandbox v1 key as AhaSend API Token and set the From name. Set the site’s email address to an address on your verified domain. Leave debug logging off to keep message details out of routine logs. Save the following as ahasend-test.php outside the public web directory. It tests the actual ahasend_mail plugin directly. Run vendor/bin/drush php:script /path/to/ahasend-test.php from the project root.
ahasend-test.php
The script fails when the module returns false. Check the corresponding AhaSend message as well as the command result.

Route Production Mail Through Mail System

At Configuration → System → Mail System, choose AhaSend mailer for the default sender and formatter, or for only the modules you intend to move. Check module-specific overrides too: Mail System uses its own default and module settings, so an override can still select a different sender. The correct plugin ID is ahasend_mail. Test both the default path and any module-specific mail you need. Keep the sandbox credential on staging and use a separate domain-restricted v1 production key on the live site. The module stores its key in Drupal configuration; keep secrets out of exported configuration and repository history by using your deployment’s configuration override mechanism. Review credential security. Test your actual password-reset, account and receipt workflows. The module’s settings form has a Test email section, but its notice alone does not prove acceptance; check Drupal logs and the AhaSend message log. The released mail plugin does not reliably pass attachments through to its handler, so verify attachment-dependent workflows before relying on them. For SMTP, the module’s project page points to Drupal Symfony Mailer; use the SMTP settings there. Track delivery webhooks after acceptance. Save a job outcome and review uncertain requests before retrying so a timeout does not produce duplicate receipts.