% if newsletter: <%! import json from plexpy import helpers, notifiers email_notifiers = [n for n in notifiers.get_notifiers() if n['agent_name'] == 'email'] sorted(email_notifiers, key=lambda k: (k['agent_label'], k['friendly_name'], k['id'])) email_notifiers = [{'id': 0, 'agent_label': 'New Email Configuration', 'friendly_name': ''}] + email_notifiers %>

#### ${newsletter['agent_label']} Newsletter Settings (Newsletter ID: ${newsletter['id']})

Enable the newsletter
Schedule

Set the schedule for the newsletter

% for item in newsletter['config_options']: % if item['input_type'] == 'help':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'text' or item['input_type'] == 'password':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'number':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'button':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'checkbox':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'select':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'selectize':
${item['label']}

${item['description'] | n}

% endif % endfor
Description

Optional: Enter a description to help identify this newsletter in the newsletters list.

Email Notification Agent

Use an existing Email notification agent or enter a new configuration below.

Email Subject

Optional: Enter a subject line for the email. Leave blank for default.
Note: You may include {server_name}, {start_date}, and {end_date} as parameters. The global date format under Settings > General will be used.

% for item in newsletter['email_config_options']: % if item['input_type'] == 'help':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'text' or item['input_type'] == 'password':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'number':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'button':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'checkbox' and item['name'] != 'email_html_support':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'select':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'selectize':
${item['label']}

${item['description'] | n}

% endif % endfor
Preview Newsletter

Preview the ${newsletter['agent_label']} newsletter.

Test Newsletter

Test if the ${newsletter['agent_label']} newsletter is working. Check the logs for troubleshooting.

% else:

#### Error

Failed to retrieve newsletter configuration. Check the logs for more info.
% endif