diff --git a/data/interfaces/default/notification_config.html b/data/interfaces/default/notification_config.html index 286ac1b0..8732e6a9 100644 --- a/data/interfaces/default/notification_config.html +++ b/data/interfaces/default/notification_config.html @@ -66,9 +66,9 @@ from plexpy import helpers % endfor -
+

Test ${agent['name']}

-

Test if ${agent['name']} notifications are working. See logs for troubleshooting.

+

Test if ${agent['name']} notifications are working. See logs for troubleshooting.

diff --git a/plexpy/config.py b/plexpy/config.py index 30947823..a7d4f3b3 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -61,6 +61,7 @@ _CONFIG_DEFINITIONS = { 'CONFIG_VERSION': (str, 'General', '0'), 'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0), 'EMAIL_ENABLED': (int, 'Email', 0), + 'EMAIL_FROM_NAME': (str, 'Email', 'PlexPy'), 'EMAIL_FROM': (str, 'Email', ''), 'EMAIL_TO': (str, 'Email', ''), 'EMAIL_CC': (str, 'Email', ''), diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 1c06d2a2..01ed313e 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -1374,7 +1374,7 @@ class Email(object): message = MIMEText(message, 'plain', "utf-8") message['Subject'] = subject - message['From'] = email.utils.formataddr(('PlexPy', plexpy.CONFIG.EMAIL_FROM)) + message['From'] = email.utils.formataddr((plexpy.CONFIG.EMAIL_FROM_NAME, plexpy.CONFIG.EMAIL_FROM)) message['To'] = plexpy.CONFIG.EMAIL_TO message['CC'] = plexpy.CONFIG.EMAIL_CC @@ -1405,7 +1405,13 @@ class Email(object): return False def return_config_options(self): - config_option = [{'label': 'From', + config_option = [{'label': 'From Name', + 'value': plexpy.CONFIG.EMAIL_FROM_NAME, + 'name': 'email_from_name', + 'description': 'The name of the sender.', + 'input_type': 'text' + }, + {'label': 'From', 'value': plexpy.CONFIG.EMAIL_FROM, 'name': 'email_from', 'description': 'The email address of the sender.',