Loading...


Related Products


Date Published: March 12, 2024

How To Configure Symfony Mailer module with Current Drupal on Site Factory

How To Configure Symfony Mailer module with Current Drupal on Site Factory

The following steps needed to install and configure the Symfony Mailer module for Site Factory applications using the current Drupal version. These instructions assume that you have configured your Site Factory application for use with Acquia Platform Email. If you have not all ready, follow the guidance in these pages to set up your Site Factory applications to use Acquia Platform Email:

How To Install and Configure?

  • Uninstall the mailer module
  • Uninstall the SwiftMailer module

  • Install the Symfony Mailer module

  • Edit the file, factory-hooks/post-settings-php/bv-acsf-settings.php, and add the following line of code:

    • $settings['mailer_sendmail_commands'] = [ "/usr/sbin/sendmail -t" ];
  • Navigate to admin/config/system/mailer/transport

  • 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.

  • Choose the "/usr/sbin/sendmail -t " for the Command field selection, instead of the default one
  • The installation and configuration of the Symfony Mailer module is now complete!
 

How To Confirm Installation and Configuration?

Once you have followed the steps to install and configure the 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'

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

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

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation