Sending Mail with Drupal: A Reliable Setup for Business-Critical Email

Illustrated infographic summarizing: Sending Mail with Drupal: Reliable Email Setup for Business Sites

By Greg Nowak. Updated 5 November 2026.

A Drupal contact form can display a confirmation while the enquiry never reaches your team. Password resets, order updates, and approval requests can disappear in the same gap. For the business, the important question is whether someone can complete their task—and whether your team notices when they cannot.

A dependable setup connects three things: Drupal’s message handling, an authenticated delivery service, and a clear process for investigating failures. Here is how to put those pieces together.

Start with the messages you cannot afford to lose

List your critical messages, who receives them, how quickly they must arrive, and who investigates a failure. Password resets need prompt delivery. Sales enquiries need a recoverable record, so check whether your form actually stores submissions. An email notification should not be the only copy of a potential customer’s request.

For agency handovers, establish who controls the sending account, DNS, credentials, and billing. Give the client access through an organisational account so support can continue after the original developer leaves.

Choose a delivery route your team can support

An approved organisational relay or transactional email service is a practical starting point for many business sites. Look for searchable delivery logs, bounce visibility, suitable authentication, and capacity for busy periods.

Choosing how Drupal sends email
Approach Useful when Check before committing
Authenticated SMTP relay You need routine enquiries and account notifications Authentication, TLS, sending limits, and accessible logs
Core Symfony mail backend Your developer deliberately chooses Drupal’s experimental transport option Installed core version, plain-text output, and existing overrides
Provider API integration You need provider-specific templates or delivery events Module maintenance, compatibility, and failure handling
Local mail server An established infrastructure team operates email delivery Ownership of reputation, DNS, retries, and monitoring

Set up authenticated SMTP without changing everything at once

The SMTP Authentication Support module sends through PHPMailer instead of PHP’s mail(). Its published stable release supports Drupal 10 and 11 and provides this installation command:

composer require 'drupal/smtp:^1.4'

Installation is only the first step. Enable and configure the module in staging, using the provider’s host, port, TLS requirements, authentication method, and permitted sender address. Check existing mail modules and message-specific routing before changing the default backend.

Keep credentials in deployment-managed secrets or environment-specific overrides, and check that configuration exports do not contain them. Keep staging recipients controlled so testing cannot notify real customers.

Understand the core Symfony option before using it

The Drupal 11 core Symfony mail backend is still documented as experimental and sends plain-text messages. It is a transport replacement within Drupal’s existing mail system; choosing it does not provide a complete HTML template system.

If your developer selects this alternative to the SMTP module, the following settings.php override selects the backend and configures an SMTP transport:

$config['system.mail']['interface'] = [
  'default' => 'symfony_mailer',
];
$config['system.mail']['mailer_dsn'] = [
  'scheme' => 'smtp',
  'host' => getenv('SMTP_HOST'),
  'port' => 587,
  'user' => getenv('SMTP_USER'),
  'password' => getenv('SMTP_PASS'),
  'options' => [],
];

Use your provider’s required port and confirm the environment variables exist in the web application’s runtime. Review existing interface mappings before replacing them. Requirements for attachments, HTML templates, queues, or provider APIs need their own compatibility check.

Keep custom message code independent of the transport

Custom modules should compose messages through Drupal’s mail manager so business logic does not depend on one provider. In a service with an injected MailManagerInterface, a call can look like this:

$params = [
  'customer_name' => $customerName,
  'project_name' => $projectName,
];
$message = $this->mailManager->mail(
  'my_module',
  'project_notice',
  $to,
  $langcode,
  $params
);

The module’s hook_mail() implementation must supply the subject and body for project_notice. Parameters alone do not create the content. Check the result and log useful diagnostic context, but remember that Drupal documents success as acceptance at PHP level, which does not guarantee delivery.

Authenticate the domain customers see

Use a controlled address such as [email protected] in From:. Put a contact-form visitor’s validated address in Reply-To:, allowing staff to reply without asking the website to impersonate the visitor’s domain.

Configure SPF and DKIM for the sending service, then introduce DMARC reporting and verify alignment with the visible sender domain. Inventory legitimate senders—including staff email, CRM, invoicing, and newsletters—before tightening DMARC enforcement.

Gmail’s sender guidelines require SPF or DKIM, TLS, and valid forward and reverse DNS for senders to personal Gmail accounts. Bulk senders face additional SPF, DKIM, DMARC, and alignment requirements; marketing and subscribed messages also need one-click unsubscribe. Confirm which infrastructure settings the provider manages and which DNS changes your team must make.

Test the whole journey and make failures visible

A module’s test message proves less than a real password reset or form submission. Make these checks part of launch acceptance:

  • Trigger every critical message through its actual workflow from production-like infrastructure.
  • Check Gmail, Microsoft-hosted email, and an organisational mailbox, including spam folders, authentication results, links, and language.
  • Match test messages to Drupal logs and provider activity using timestamps, recipients, and available message identifiers.
  • Test failure handling in staging and confirm that saved enquiries remain accessible.

Read provider statuses carefully. Amazon SES distinguishes sends, deliveries, bounces, and delivery delays. A delivery event means acceptance by the recipient’s mail server; it does not establish inbox placement or that someone read the message.

Name an owner for alerts and failed messages. If sending uses a queue, monitor its worker or cron process and overdue jobs. Document retry behaviour to avoid duplicate notifications. Repeat delivery checks after hosting moves, DNS changes, credential rotation, and mail-module upgrades.

If enquiries are disappearing or the setup has become difficult to support, ask Greg to review your Drupal email delivery. The review can follow a real message through the system, identify where visibility is missing, and give your team a practical configuration and support plan.

Related on GrN.dk

Need help with this kind of work?

Ask Greg to review your Drupal email setup Get in touch with Greg.

Sources

Latest articles

WordPress jobs running late? Learn how to separate scheduling problems, task errors and a growing backlog, then choose the right scheduler or runner.

Before changing an AI workflow, check that it still does the job. Use realistic examples, clear release criteria and a comparison with the version running today.

Sending an invoice does not mean it has arrived. Understand delivery statuses, the system requirements coming in 2027, and how focused AI support can help finance teams handle errors and follow-up.

Before scaling AI content, check the pages you already have. Verify claims, resolve overlapping coverage, and give WordPress reviewers control over publication.

Build a refund approval workflow in n8n and Stripe that shows reviewers the exact action, expires old approvals and tracks refunds through to completion.

A timeout can hide a successful job creation. Use stable operation IDs, destination API rules and a clear recovery process to prevent duplicate work.

Does your ChatGPT subscription cover website translation? Understand API credits, access and a WordPress workflow that turns approved Danish content into translation drafts.

An internal AI can keep quoting a deleted policy. Check document updates, indexed passages and cached answers to find where outdated guidance survives.

Codex drew all ten pages of my Ninjai comic from the script Claude wrote in the first test. What made that handover work, and what it cost.

ChatGPT delivered ten painted comic pages; Claude drew one page in code. A practical look at AI tool selection, creative briefs and approval decisions.