Fix sending mail when the receipient is a list (as in sample tracking mail routines).

This commit is contained in:
Nate Coraor
2011-08-24 15:33:07 -04:00
parent e81c4ef6a8
commit eb036815cb
+4 -1
View File
@@ -572,8 +572,11 @@ def send_mail( frm, to, subject, body, config ):
"""
Sends an email.
"""
header_to = to
if isinstance( to, list ):
header_to = ', '.join( to )
msg = MIMEText( body )
msg[ 'To' ] = to
msg[ 'To' ] = header_to
msg[ 'From' ] = frm
msg[ 'Subject' ] = subject
if config.smtp_server is None: