---
title: "Troubleshooting Drupal email issues"
date: "2025-02-06T01:12:58+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/93261-troubleshooting-drupal-email-issues"
id: "340b3ff4-ef26-4381-a585-d2555bf7b3d2"
---

Issue
-----

Occasionally, your website's users may not receive emails from your Drupal website. There can be several reasons for this, including the following:

*   The Drupal website's email server never initially sends the email.
*   The sent email is blocked by an email server or filter before it reaches its intended recipient.
*   The intended recipient's email clients discard the email as spam.

Resolution
----------

This article provides information about how to troubleshoot email issues and how you can resolve some of the issues that can occur when sending email from your website.

### Modules for testing

When testing your email settings, it's often preferred to do so in a way that does not require emailing all of that environment's users. The following contributed Drupal modules can help you save emails to your logs instead of actually sending emails. The recommended module to do this depends on the version of Drupal you have installed:

*   **Drupal 8 version and above**
    
    Download and install the [Helper](https://drupal.org/project/helper) module, which has a mail handler that writes all emails to the database log. After you install the module, add the following code to your `settings.php` file to use the Helper module's mail handler:
    
        <?php
            $config['system.mail']['interface']['default'] = 'helper_logger';
        ?>
    
    After you send an email from your website, in the admin menu, go to **Reports > Recent log entries** to view the email's details.
    
*   **Drupal 7 version**
    
    Download and install the [Helper](https://drupal.org/project/helper) module, which has a mail handler that writes all emails to the database log. After you install the module, add the following code to your `settings.php` file to use the Helper module's mail handler:
    
        <?php
            $conf['mail_system'] = array('default-system' => 'HelperDebugMailLog');
        ?>
    
    After you send an email from your website, in the admin menu, go to **Reports > Recent log entries** to view the email's details.  
     
    

### Working with mail server logs

**Important**  
[**Acquia Cloud Enterprise**](/node/57241) or [**Site Factory**](/node/57258) customers on dedicated instances can **[contact Acquia Support](https://insight.acquia.com/support)** for copies of your logs. If you are on shared Acquia resources, these files are not available.

Websites with different hosting providers that can access mail servers can review the server's email log files. These log files are normally located in `/var/log/exim4/` and you can use them to ensure both that Drupal sent the email, and that the server accepted the email.

If you don't see any errors in the log file for the email, and if you didn't receive a bounce to the return address (for example, `webmaster@domain.com`), the email was successfully sent.  
 

### Other common issues

#### My website successfully sent an email, but the recipient never received it. What else can be wrong?

If the email was successfully sent but not delivered to the intended recipient, the problem is usually either that the end user's spam filter caught the email, or that some email server along the path to the user stopped the email (for example, due to over aggressive deny-listing). In this case, try the following:

*   Have the intended recipient confirm that the email provider (for corporate users, this could be the IT department) is accepting email that is relayed from your email server.
    
    **Note for Acquia Cloud customers**  
    For Acquia customers' email server details, see [About email in your Acquia Cloud environment](https://docs.acquia.com/acquia-cloud/manage/email/). Emails sent from an Acquia email server include the following additional line:
    
        on behalf of [customer_URL]
    
    where `[customer_URL]` is the Acquia customer's website URL
    
*   If you're seeing error messages (such as `Sender Address Rejected`), examine the Sender Policy Framework (SPF) record. To deal with unwanted email, some email servers refuse email with FROM addresses based on a domain from an unrecognized email server. Email servers use SPF (as defined in RFC 4408) to validate the hosts and domains that are allowed to send email. For more information about SPF records, see the [Adding DNS records for Platform Email](/node/56365) article.

 

#### Performance problems from email campaigns

Some email campaigns contain personalized links, so that you can track the number of users who respond to the email and visit your website. This, while valuable for tracking, can cause performance issues. Since each visit in response to the email uses a unique URL, your website will not be able to serve the webpage out of cache. Furthermore, since many visitors are likely to click on the link shortly after receiving the email (if at all), your website is likely to experience a spike in traffic that can't be handled by the cache.

You can avoid these performance issues by not using unique URLs in email campaigns, if possible.