mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8798 from creative-commoners/pulls/4/disabling-emails-docs
DOCS Add example for disabling emails in dev mode via configuration
This commit is contained in:
commit
4b07caf05f
@ -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