Skip to content

Commit

Permalink
Merge pull request #29 from hubertusanton/main
Browse files Browse the repository at this point in the history
use statement gone?
  • Loading branch information
micschk authored Aug 21, 2024
2 parents e5ac39f + 7d6cf3f commit 2a31767
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _config.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php

use SilverStripe\Core\Environment;

//
// Set system email sender via ENV (moved to _config.php because BACKTICKS ENV VARS in Yaml are only supported via Injector)
//
$sys_email = Environment::getEnv('APP_SYSTEM_EMAIL_ADDRESS');
$sys_name = Environment::getEnv('APP_SYSTEM_EMAIL_SENDER');
if($sys_email && $sys_name) {
if ($sys_email && $sys_name) {
SilverStripe\Control\Email\Email::config()->set('admin_email', [$sys_email => $sys_name]);
}

0 comments on commit 2a31767

Please sign in to comment.