mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8943 from Cheddam/patch-1
DOCS: Use environment variables in example SMTP config
This commit is contained in:
commit
6d271f0a18
@ -18,7 +18,7 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
Swift_Transport: Swift_SendmailTransport
|
Swift_Transport: Swift_SendmailTransport
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, to use SMTP, create a file app/_config/email.yml:
|
For example, to use SMTP, create a file `app/_config/email.yml`:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
---
|
---
|
||||||
@ -34,11 +34,13 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
Port: <port>
|
Port: <port>
|
||||||
Encryption: tls
|
Encryption: tls
|
||||||
calls:
|
calls:
|
||||||
Username: [ setUsername, ['<username>'] ]
|
Username: [ setUsername, ['`APP_SMTP_USERNAME`'] ]
|
||||||
Password: [ setPassword, ['<password>'] ]
|
Password: [ setPassword, ['`APP_SMTP_PASSWORD`'] ]
|
||||||
AuthMode: [ setAuthMode, ['login'] ]
|
AuthMode: [ setAuthMode, ['login'] ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note the usage of backticks to designate environment variables for the credentials - ensure you set these in your `.env` file or in your webserver configuration.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Sending plain text only
|
### Sending plain text only
|
||||||
|
Loading…
Reference in New Issue
Block a user