diff --git a/pagure/lib/notify.py b/pagure/lib/notify.py index 94c78a4..3f66c59 100644 --- a/pagure/lib/notify.py +++ b/pagure/lib/notify.py @@ -130,8 +130,9 @@ def send_email(text, subject, to_mail, # Send the message via our own SMTP server, but don't include the # envelope header. + smtp = smtplib.SMTP(pagure.APP.config['SMTP_SERVER']) for mailto in to_mail.split(','): - smtp = smtplib.SMTP(pagure.APP.config['SMTP_SERVER']) + smtp.connect() lcl_msg = msg lcl_msg['To'] = mailto salt = pagure.APP.config.get('SALT_EMAIL')