##// END OF EJS Templates
rcmail: pass smtplib.SMTP.sendmail to_addrs as list...
Mads Kiilerich -
r8380:9c408c0f default
parent child Browse files
Show More
@@ -96,7 +96,7 b' class SmtpMailer(object):'
96 if self.user and self.passwd:
96 if self.user and self.passwd:
97 smtp_serv.login(self.user, self.passwd)
97 smtp_serv.login(self.user, self.passwd)
98
98
99 smtp_serv.sendmail(msg.sender, msg.send_to, raw_msg.as_string())
99 smtp_serv.sendmail(msg.sender, list(msg.send_to), raw_msg.as_string())
100 logging.info('MAIL SENT TO: %s' % recipients)
100 logging.info('MAIL SENT TO: %s' % recipients)
101
101
102 try:
102 try:
@@ -21,9 +21,8 b' class smtplib_mock(object):'
21
21
22 def sendmail(self, sender, dest, msg):
22 def sendmail(self, sender, dest, msg):
23 smtplib_mock.lastsender = sender
23 smtplib_mock.lastsender = sender
24 smtplib_mock.lastdest = dest
24 smtplib_mock.lastdest = set(dest)
25 smtplib_mock.lastmsg = msg
25 smtplib_mock.lastmsg = msg
26 pass
27
26
28
27
29 @mock.patch('kallithea.lib.rcmail.smtp_mailer.smtplib', smtplib_mock)
28 @mock.patch('kallithea.lib.rcmail.smtp_mailer.smtplib', smtplib_mock)
General Comments 0
You need to be logged in to leave comments. Login now