cubicweb/cwconfig.py
changeset 12722 1a5eb9a9f5b4
parent 12709 280c9db41038
parent 12719 9fb4a71f119d
child 12738 a54037a68b14
equal deleted inserted replaced
12718:cc55093cc86d 12722:1a5eb9a9f5b4
  1246                 if self.mode == 'test':
  1246                 if self.mode == 'test':
  1247                     raise
  1247                     raise
  1248                 return False
  1248                 return False
  1249             for msg, recipients in msgs:
  1249             for msg, recipients in msgs:
  1250                 try:
  1250                 try:
  1251                     smtp.sendmail(fromaddr, recipients, msg.as_string())
  1251                     smtp.sendmail(fromaddr, recipients, msg.as_bytes())
  1252                 except Exception as ex:
  1252                 except Exception as ex:
  1253                     self.exception("error sending mail to %s (%s)",
  1253                     self.exception("error sending mail to %s (%s)",
  1254                                    recipients, ex)
  1254                                    recipients, ex)
  1255                     if self.mode == 'test':
  1255                     if self.mode == 'test':
  1256                         raise
  1256                         raise