Friday, June 12, 2026

Netbox and Emails

Just thought I would share this nugget of information that I found today as I was testing a new plugin for our deployment of Netbox. 

If you are writing a plugin or a script for Netbox, and it send emails to get the from email address defined in the FROM_EMAIL, you need to do the following.

from django.conf import settings
from_email = settings.SERVER_EMAIL

Netbox when it loads the settings.py file maps the parameter FROM_EMAIL to the variable SERVER_EMAIL and not DEFAULT_FROM_EMAIL. If you use DEFAULT_FROM_EMAIL, you will see that your messages come from webmaster@localhost and not what you have configured. 

No comments:

Post a Comment