Drupal SMTP: a free module for Drupal 10 and 11
Sign-ups, password resets, contact forms and notifications: the SMTP Senpai module sends Drupal email over HTTPS with your API key. Keep the API key in settings.php if you prefer, after enabling the module in Drupal.
- Free plan, no card and no expiry
- Servers and data in the EU
- A log of every delivery
// Enable and configure the module in Drupal first.
// Set MAILSENPAI_API_KEY in the server environment.
$config['smtp_senpai.settings']['api_key'] = getenv('MAILSENPAI_API_KEY') ?: '';
// Select the verified sender in the module settings.Four details, and your emails go out
They are the same for every program: you also find them, already filled in, in your customer area.
The sender must be on a domain verified in your area: otherwise the server refuses to send. For SPF, DKIM and DMARC records, use the free email DNS checker.
Three steps
Install the module
Download the zip below, unzip it into modules/contrib and enable it from Extend or with drush en smtp_senpai.
Paste your API key
In Configuration › System › SMTP Senpai paste the key from your customer area and tick the box that sends all the emails of the site through SMTP Senpai.
Test and check your domain
On the test tab, send a test email, see the account status and check SPF, DKIM, DMARC and MX of your sender domain.
The SMTP Senpai module for Drupal is free. It sends with the API key over HTTPS, also where the host blocks SMTP ports: test email, sender domain check, account status, errors explained in plain words, optional fallback to the Drupal mailer. No dependency on other modules. Version 1.0.0, for Drupal 10.3 and later and Drupal 11. Open source, licensed under the GNU/GPL version 2 or later.
Verify a Drupal notification end to end
Use the official SMTP Senpai project for Drupal 10.3+ or Drupal 11; ensure your PHP version meets the requirements of your Drupal core release. Start on staging and use the package and installation instructions linked from Drupal.org.
Enable the module, enter the API key under Configuration > System > SMTP Senpai and choose the option that routes site email through the module. Send one test to a mailbox you control, then trigger a password reset or another real Drupal notification. If the module test works but that notification is absent from the log, check the originating module and mail-system configuration. API acceptance is distinct from recipient inbox placement.
Read the error before retrying
An invalid-key error requires checking the saved key and account state. A sender-domain rejection requires verifying that domain. A quota or rate-limit response requires waiting for the relevant limit or reviewing the plan; a network timeout requires checking outbound connectivity. Avoid blind retries: they do not correct credentials or DNS. Keep credentials and customer information out of public logs.
Use the official package page, source and setup reference and API error and delivery-event documentation. Service logs are retained for 7 days on the free plan and 90 days on paid plans. A local application log may have different retention.
Frequently asked questions
Which Drupal versions are supported?
The module supports Drupal 10.3+ and Drupal 11. Your PHP version must also meet the requirements of the installed Drupal core release: Drupal 11 requires PHP 8.3 or later. Check the official Drupal PHP requirements before installing.
Can I keep the key out of the database?
Yes: write it in settings.php with $config['smtp_senpai.settings']['api_key']. If you use the Key module, you can pick a key stored there.
What happens when I turn the module off?
The mail system that was in place before comes back: the module remembers it and restores it.
Can I use SMTP instead of the API?
This module sends through the SMTP Senpai API over HTTPS. To use SMTP instead, configure a compatible Drupal SMTP transport module with relay.mailsenpai.com, port 2525 or 587, STARTTLS and your relay credentials. The settings.php example here overrides the API key; it does not configure core SMTP sending.
More integration guides
Try SMTP Senpai with your own software
Start free: connect your software, send your real emails and check the log line by line. No card and no expiry.