Skip to content
Snippets Groups Projects
Commit c59477c3 authored by jurgenhaas's avatar jurgenhaas
Browse files

#65 Add support for symfony mailer as a...

#65 Add support for symfony mailer as a replacement for the smtp module
parent 4c785393
No related branches found
No related tags found
1 merge request!81Merging develop into main
Pipeline #1156851 passed
......@@ -142,6 +142,13 @@ class Handler extends BaseHandler {
'returnpath' => $this->env->receiveGlobal('MAILPIT_RETURNPATH', 'MailPit Bounce Address'),
'recipientallowlist' => $this->env->receiveGlobal('MAILPIT_RECIPIENT_ALLOW_LIST', 'MailPit Regex for allowed recipients'),
],
'symfony_mailer' => [
'enable' => 0,
'host' => '',
'port' => 25,
'username' => '',
'password' => '',
],
'varnish' => [
'enable' => 0,
],
......
......@@ -33,8 +33,19 @@ $databases = array(
),
),
);
{% if not drupal.live|default(0) or mailhog.enable or mailpit.enable %}
$config['system.mail']['interface']['default'] = 'SMTPMailSystem';
{% if not drupal.live|default(0) or mailhog.enable or mailpit.enable or symfony_mailer.enable %}
$config['system.mail']['interface']['default'] = '{% if symfony_mailer.enable %}symfony_mailer{% else %}SMTPMailSystem{% endif %}';
{% if symfony_mailer.enable %}
$config['system.mail']['mailer_dsn'] = [
'scheme' => 'smtp',
'host' => '{% if mailpit.enable %}mailpit{% elseif mailhog.enable %}mailhog{% else %}{{ symfony_mailer.host }}{% endif %}',
'port' => {% if mailpit.enable or mailhog.enable %}1025{% else %}{{ symfony_mailer.port }}{% endif %},
{% if not mailpit.enable and not mailhog.enable %}
'user' => '{{ symfony_mailer.username }}',
'password' => '{{ symfony_mailer.password }}',
{% endif %}
];
{% else %}
$config['smtp.settings']['smtp_on'] = TRUE;
$config['smtp.settings']['smtp_host'] = '{% if mailhog.enable %}mailhog{% else %}mailpit{% endif %}';
$config['smtp.settings']['smtp_hostbackup'] = '';
......@@ -42,6 +53,7 @@ $config['smtp.settings']['smtp_port'] = '1025';
$config['smtp.settings']['smtp_protocol'] = 'standard';
$config['smtp.settings']['smtp_username'] = '';
$config['smtp.settings']['smtp_password'] = '';
{% endif %}
$settings['danse_notification_delivery'] = {{ drupal.danse_notification_delivery|default('FALSE') }};
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment