From 34a87011da6cac2b5f0a8be7b7b075021b97ca17 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Thu, 6 Oct 2016 10:31:37 -0400 Subject: [PATCH] Changing 'to' to list and BCC instead Was still having issues with multiple recipients. Removing line 83 causes messages to be sent as bcc. bcc is more desirable right now. --- notify_on_added.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notify_on_added.py b/notify_on_added.py index ab53dd4..9621e35 100644 --- a/notify_on_added.py +++ b/notify_on_added.py @@ -48,7 +48,7 @@ if not too: exit() # Join email addresses -to = ','.join([u['email'] for u in users if p.show_name in u['shows']]) +to = list([u['email'] for u in users if p.show_name in u['shows']]) # Email settings name = 'PlexPy' # Your name @@ -80,7 +80,7 @@ if p.show_type.lower() == 'show' or p.show_type.lower() == 'episode': message = MIMEText(show_html, 'html') message['Subject'] = email_subject message['From'] = email.utils.formataddr((name, sender)) - message['To'] = to + mailserver = smtplib.SMTP(email_server, email_port) mailserver.starttls()