mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Add email subject line and sending newsletters
This commit is contained in:
parent
d104ec216c
commit
5ac5b3cd29
6 changed files with 94 additions and 59 deletions
|
@ -454,7 +454,7 @@ def get_notifier_config(notifier_id=None):
|
|||
return None
|
||||
|
||||
try:
|
||||
config = json.loads(result.pop('notifier_config') or '{}')
|
||||
config = json.loads(result.pop('notifier_config', '{}'))
|
||||
notifier_agent = get_agent_class(agent_id=result['agent_id'], config=config)
|
||||
notifier_config = notifier_agent.return_config_options()
|
||||
except Exception as e:
|
||||
|
@ -772,6 +772,9 @@ class Notifier(object):
|
|||
|
||||
return new_config
|
||||
|
||||
def return_default_config(self):
|
||||
return self._DEFAULT_CONFIG
|
||||
|
||||
def notify(self, subject='', body='', action='', **kwargs):
|
||||
if self.NAME != 'Script':
|
||||
if not subject and self.config.get('incl_subject', True):
|
||||
|
@ -1271,7 +1274,7 @@ class EMAIL(Notifier):
|
|||
Email notifications
|
||||
"""
|
||||
NAME = 'Email'
|
||||
_DEFAULT_CONFIG = {'from_name': '',
|
||||
_DEFAULT_CONFIG = {'from_name': 'Tautulli',
|
||||
'from': '',
|
||||
'to': '',
|
||||
'cc': '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue