1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add email testing example (#4152)

* Add email testing example

Includes an example provided by  Jeremy

* Updated with suggestions

Co-authored-by: Jeremy Stretch <jeremy.stretch@networktocode.com>
This commit is contained in:
Joshua Corrick
2020-02-12 16:15:05 -05:00
committed by GitHub
parent 64c0059dd8
commit 6d7c5d51fe

View File

@ -109,6 +109,14 @@ In order to send email, NetBox needs an email server configured. The following i
* TIMEOUT - Amount of time to wait for a connection (seconds) * TIMEOUT - Amount of time to wait for a connection (seconds)
* FROM_EMAIL - Sender address for emails sent by NetBox * 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 django function [send_mail()]( https://docs.djangoproject.com/en/3.0/topics/email/#send-mail):
```
# python ./manage.py nbshell
>>> 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 ## EXEMPT_VIEW_PERMISSIONS