diff --git a/kallithea/lib/rcmail/smtp_mailer.py b/kallithea/lib/rcmail/smtp_mailer.py --- a/kallithea/lib/rcmail/smtp_mailer.py +++ b/kallithea/lib/rcmail/smtp_mailer.py @@ -96,7 +96,7 @@ class SmtpMailer(object): if self.user and self.passwd: smtp_serv.login(self.user, self.passwd) - smtp_serv.sendmail(msg.sender, msg.send_to, raw_msg.as_string()) + smtp_serv.sendmail(msg.sender, list(msg.send_to), raw_msg.as_string()) logging.info('MAIL SENT TO: %s' % recipients) try: diff --git a/kallithea/tests/other/test_mail.py b/kallithea/tests/other/test_mail.py --- a/kallithea/tests/other/test_mail.py +++ b/kallithea/tests/other/test_mail.py @@ -21,9 +21,8 @@ class smtplib_mock(object): def sendmail(self, sender, dest, msg): smtplib_mock.lastsender = sender - smtplib_mock.lastdest = dest + smtplib_mock.lastdest = set(dest) smtplib_mock.lastmsg = msg - pass @mock.patch('kallithea.lib.rcmail.smtp_mailer.smtplib', smtplib_mock)