mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS Add example for disabling emails in dev mode via configuration
[ci skip]
This commit is contained in:
parent
b8122f88c5
commit
95b44d840d
@ -198,6 +198,22 @@ $email->getSwiftMessage()->getHeaders()->addTextHeader('HeaderName', 'HeaderValu
|
|||||||
See this [Wikipedia](http://en.wikipedia.org/wiki/E-mail#Message_header) entry for a list of header names.
|
See this [Wikipedia](http://en.wikipedia.org/wiki/E-mail#Message_header) entry for a list of header names.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## Disabling Emails
|
||||||
|
|
||||||
|
If required, you can also disable email sending entirely. This is useful for testing and staging servers where
|
||||||
|
you do not wish to send emails out.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
Name: myemailconfig
|
||||||
|
Only:
|
||||||
|
Environment: dev
|
||||||
|
---
|
||||||
|
SilverStripe\Core\Injector\Injector:
|
||||||
|
Swift_Transport:
|
||||||
|
class: Swift_NullTransport
|
||||||
|
```
|
||||||
|
|
||||||
## SwiftMailer Documentation
|
## SwiftMailer Documentation
|
||||||
|
|
||||||
For further information on SwiftMailer, consult their docs: http://swiftmailer.org/docs/introduction.html
|
For further information on SwiftMailer, consult their docs: http://swiftmailer.org/docs/introduction.html
|
||||||
|
Loading…
Reference in New Issue
Block a user