Skip to content

Commit

Permalink
feat(config): added configuration option for sendmail in settings.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Feb 26, 2021
1 parent 37c1966 commit 91f476b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions elgg-config/settings.example.php
Expand Up @@ -384,6 +384,11 @@
*/
//$CONFIG->emailer_transport = 'sendmail';

/**
* Configure sendmail related settings
*/
//$CONFIG->emailer_sendmail_settings = '';

/**
* Configure emailer SMTP settings
*
Expand Down
1 change: 1 addition & 0 deletions engine/classes/Elgg/Config.php
Expand Up @@ -54,6 +54,7 @@
* @property bool $elgg_config_set_secret
* @property bool $enable_profiling
* @property string $emailer_transport This is an override for Elgg's default email handling transport (default sendmail)
* @property array $emailer_sendmail_settings This configures SendMail if $emailer_transport is set to "sendmail" or default
* @property array $emailer_smtp_settings This configures SMTP if $emailer_transport is set to "smtp"
* @property mixed $embed_tab
* @property string $exception_include This is an optional script used to override Elgg's default handling of uncaught exceptions.
Expand Down
2 changes: 1 addition & 1 deletion engine/classes/Elgg/Di/ServiceProvider.php
Expand Up @@ -497,7 +497,7 @@ public function __construct(Config $config) {
$transport->setOptions($transportOptions);
return $transport;
default:
return new \Laminas\Mail\Transport\Sendmail();
return new \Laminas\Mail\Transport\Sendmail($c->config->emailer_sendmail_settings);
}
});

Expand Down

0 comments on commit 91f476b

Please sign in to comment.