Integration guide · Drupal

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
Reviews of the MailSenpai service, not this connectorGoogleCapterraTrustpilot
settings.php: API key override for the enabled SMTP Senpai module
// 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.
the 4 details

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.

Serverrelay.mailsenpai.com
Port2525 or 587
SecuritySTARTTLS
Username and passwordin the customer area, SMTP Senpai page

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.

how to

Three steps

1

Install the module

Download the zip below, unzip it into modules/contrib and enable it from Extend or with drush en smtp_senpai.

2

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.

3

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.

Drupal.orgDownload the module (zip)GitLabAll integrations

from installation to a received message

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.

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.

Free, no card and no expiryFree plan