Merge pull request #7885 from dhensby/pulls/4.0/email-docs-config

DOCS update email docs to use correct config syntax
This commit is contained in:
Loz Calver 2018-02-26 12:32:13 +00:00 committed by GitHub
commit e23353fe99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,12 +133,12 @@ Configuration of those properties looks like the following:
**mysite/_config.php**
```php
use SilverStripe\Control\Director;
use SilverStripe\Control\Email\Email;
use SilverStripe\Core\Config\Config;
if(Director::isLive()) {
Config::inst()->update('Email', 'bcc_all_emails_to', "client@example.com");
Config::modify()->set(Email::class, 'bcc_all_emails_to', "client@example.com");
} else {
Config::inst()->update('Email', 'send_all_emails_to', "developer@example.com");
Config::modify()->set(Email::class, 'send_all_emails_to', "developer@example.com");
}
```