mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
Add email testing example
Includes an example provided by Jeremy
This commit is contained in:
parent
68fbd9b017
commit
e53994dd08
@ -109,6 +109,16 @@ In order to send email, NetBox needs an email server configured. The following i
|
||||
* TIMEOUT - Amount of time to wait for a connection (seconds)
|
||||
* FROM_EMAIL - Sender address for emails sent by NetBox
|
||||
|
||||
Email is sent from NetBox only for critical events. If you would like to test the email server configuration please use the following:
|
||||
|
||||
```
|
||||
# python ./manage.py nbshell
|
||||
### NetBox interactive shell (jstretch-workstation)
|
||||
### Python 3.6.8 | Django 2.2.10 | NetBox 2.7.4
|
||||
### lsmodels() will show available models. Use help(<model>) for more info.
|
||||
>>> from django.core.mail import send_mail
|
||||
>>> send_mail('Test Email Subject', 'Test Email Body', 'noreply-netbox@example.com', ['users@example.com'], fail_silently=False)
|
||||
```
|
||||
---
|
||||
|
||||
## EXEMPT_VIEW_PERMISSIONS
|
||||
|
Loading…
Reference in New Issue
Block a user