BlackflySolutions / Simuliidae

An open source Drupal CiviCRM Container Stack
GNU Affero General Public License v3.0
12 stars 4 forks source link

Drupal and outgoing STMP #5

Closed rootless4real closed 4 years ago

rootless4real commented 4 years ago

Drupal isn't exposing a configuration option for outgoing SMTP. As configured, password emails for account creation (or reset) can't be mailed.

From the CiviCRM sysadmin chat, BGM shared a Drupal module he wrote which perfectly solves this problem: https://lab.civicrm.org/extensions/civicrmmailer-d7/-/commits/master. It has Drupal use the CiviCRM configured outgoing SMTP. It works beautifully.

I'm not sure how to integrate this Drupal module into the configuration script, but I thought it might be trivial for you. It certainly makes everything much more functional out of the box.

adixon commented 4 years ago

Correct, and also note that in a dev/staging environment that might be a desired state of affairs.

The short answer is: that issue is outside the scope of the project.

The longer answer is: there are lots of different solutions to that issue, and the right one depends on a lot of factors (e.g. your infrastructure, and your use case). Glad you found that one that works for yours.

The one I use is to set up postfix on the host and use a little program called ssmtp to forward mail. You can see that here: https://github.com/BlackflySolutions/prosimulium/blob/master/7/apache/drupal/Dockerfile

There are also native drupal modules that can use an external smtp server.