From 6f912d4aa2377a79c423b4e9f0f28205a3bdd27c Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 19 Jan 2018 15:54:58 -0800 Subject: [PATCH] Add date header to Emails and do not add HTML line breaks automatically --- plexpy/notifiers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 57b45e13..a5101d52 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -1240,13 +1240,13 @@ class EMAIL(Notifier): def agent_notify(self, subject='', body='', action='', **kwargs): if self.config['html_support']: - body = body.replace('\n', '
') msg = MIMEMultipart('alternative') msg.attach(MIMEText(bleach.clean(body, strip=True), 'plain', 'utf-8')) msg.attach(MIMEText(body, 'html', 'utf-8')) else: msg = MIMEText(body, 'plain', 'utf-8') + msg['Date'] = email.utils.formatdate(localtime=True) msg['Subject'] = subject msg['From'] = email.utils.formataddr((self.config['from_name'], self.config['from'])) msg['To'] = ','.join(self.config['to'])