---
title: "How To Configure Symfony Mailer module with Current Drupal"
date: "2024-03-12T01:46:59+00:00"
summary:
image:
type: "article"
url: "/site-factory/help/93541-how-configure-symfony-mailer-module-current-drupal"
id: "27b2446f-155a-4a4a-86f8-d8113cccd3bc"
---

This page provides instructions for configuring the [**Symfony Mailer**](https://www.drupal.org/project/symfony_mailer) module with the current version of Drupal on Acquia Cloud Platform and Acquia Cloud Site Factory.

**Pre-requisites**

These instructions assume that you have configured your Cloud Platform or Site Factory application for use with [**Acquia Platform Email**](/node/56305). If you have not done so, follow the guidance on this page to complete proper configuration.

*   [Managing emails with Platform Email](/node/56305)

Configuring Symfony Mailer module with current Drupal on Cloud Platform
-----------------------------------------------------------------------

Symfony Mailer is compatible with Platform Email on Cloud Platform. To correctly configure this module, you must update the following code in the `sites/default/settings.php` file:

    $settings['mailer_sendmail_commands'] = [
       '/usr/sbin/sendmail -t'
    ];

Configuring Symfony Mailer module with current Drupal on Site Factory
---------------------------------------------------------------------

### Installation and configuration

1.  Uninstall the [**mailer**](https://www.drupal.org/project/mailer) module
2.  Uninstall the [**SwiftMailer**](https://www.drupal.org/project/swiftmailer) module
3.  Install the [**Symfony Mailer**](https://www.drupal.org/project/symfony_mailer) module
4.  Edit the file, `factory-hooks/post-settings-php/bv-acsf-settings.php`, and add the following line of code:
    1.      $settings['mailer_sendmail_commands'] = [ "/usr/sbin/sendmail -t" ];
        
5.  Navigate to `admin/config/system/mailer/transport`
6.  If you have not added a **Sendmail** item to the **Transport type** field, then click on **Add Transport**,  
    Otherwise click on **Edit** for the **Sendmail** item.
7.  Choose the "`/usr/sbin/sendmail -t` " for the **Command** field selection, instead of the default one

The installation and configuration of the [**Symfony Mailer**](https://www.drupal.org/project/symfony_mailer) module is now complete! 

### Confirming Installation and Configuration

Once you have followed the steps to install and configure the [**Symfony Mailer**](https://www.drupal.org/project/symfony_mailer) module in your Drupal application, you can verify that this is set up correctly using the following:

*   **Confirm configuration is valid using drush:**

Use the following drush command to confirm that the configuration is valid:

    drush --uri=<site_url> cget symfony_mailer.mailer_transport.sendmail

Example Expected output:

    drush --uri=https://my.example/com cget symfony_mailer.mailer_transport.sendmail
    uuid: bb7fc178-f5a4-4e99-acc4-b6140cc84d1a
    langcode: en
    status: true
    dependencies: {  }
    _core:
      default_config_hash: JlhtZGzrKvb_1TFIVW-o2lEEoew2ixHkdpZ1WzIkJMY
    id: sendmail
    label: Sendmail
    plugin: sendmail
    configuration:
      query:
        command: '/usr/sbin/sendmail -t'

*   **Use the** [**Symfony Mailer**](https://www.drupal.org/project/symfony_mailer) **module test functionality:**

Send an email from your Site Factory Drupal application to confirm you receive it:

1.  Navigate to **admin/config/system/mailer/test** to the Mailer test  page
2.  Enter an email address in the **Recipient** field or leave this blank to send the email to your Drupal email.
3.  Click on the **Send** button.
4.  Confirm that you receive an email from the Site Factory site.