mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add Email from name option
This commit is contained in:
parent
6d5b5e15d5
commit
65f27ee605
3 changed files with 11 additions and 4 deletions
|
@ -66,9 +66,9 @@ from plexpy import helpers
|
||||||
% endfor
|
% endfor
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12" style="margin-top: 10px; padding-top: 10px; border-top: 1px solid #444;">
|
||||||
<h4>Test ${agent['name']}</h4>
|
<h4>Test ${agent['name']}</h4>
|
||||||
<p class="help-block">Test if ${agent['name']} notifications are working. See logs for troubleshooting.</p>
|
<p class="help-block">Test if ${agent['name']} notifications are working. See <a href="/logs">logs</a> for troubleshooting.</p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="test_subject">Subject Line</label>
|
<label for="test_subject">Subject Line</label>
|
||||||
<input class="form-control" type="text" id="test_subject" name="test_subject" value="PlexPy">
|
<input class="form-control" type="text" id="test_subject" name="test_subject" value="PlexPy">
|
||||||
|
|
|
@ -61,6 +61,7 @@ _CONFIG_DEFINITIONS = {
|
||||||
'CONFIG_VERSION': (str, 'General', '0'),
|
'CONFIG_VERSION': (str, 'General', '0'),
|
||||||
'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0),
|
'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0),
|
||||||
'EMAIL_ENABLED': (int, 'Email', 0),
|
'EMAIL_ENABLED': (int, 'Email', 0),
|
||||||
|
'EMAIL_FROM_NAME': (str, 'Email', 'PlexPy'),
|
||||||
'EMAIL_FROM': (str, 'Email', ''),
|
'EMAIL_FROM': (str, 'Email', ''),
|
||||||
'EMAIL_TO': (str, 'Email', ''),
|
'EMAIL_TO': (str, 'Email', ''),
|
||||||
'EMAIL_CC': (str, 'Email', ''),
|
'EMAIL_CC': (str, 'Email', ''),
|
||||||
|
|
|
@ -1374,7 +1374,7 @@ class Email(object):
|
||||||
|
|
||||||
message = MIMEText(message, 'plain', "utf-8")
|
message = MIMEText(message, 'plain', "utf-8")
|
||||||
message['Subject'] = subject
|
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['To'] = plexpy.CONFIG.EMAIL_TO
|
||||||
message['CC'] = plexpy.CONFIG.EMAIL_CC
|
message['CC'] = plexpy.CONFIG.EMAIL_CC
|
||||||
|
|
||||||
|
@ -1405,7 +1405,13 @@ class Email(object):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def return_config_options(self):
|
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,
|
'value': plexpy.CONFIG.EMAIL_FROM,
|
||||||
'name': 'email_from',
|
'name': 'email_from',
|
||||||
'description': 'The email address of the sender.',
|
'description': 'The email address of the sender.',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue