only use mailcatcher if debug mode is on

This commit is contained in:
Jacob Haslehurst 2013-05-31 13:41:28 +10:00
parent 091ae6d1fc
commit 8e5ef66f0a

View File

@ -68,11 +68,12 @@ If you've installed via RVM this probably won't work unless you've manually adde
For use in Django, simply add the following configuration to your projects' settings.py
```python
EMAIL_HOST = '127.0.0.1'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 1025
EMAIL_USE_TLS = False
if DEBUG:
EMAIL_HOST = '127.0.0.1'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 1025
EMAIL_USE_TLS = False
```
### API