Fw: sendmail error

Chris Withers chris at simplistix.co.uk
Tue Aug 31 19:17:47 CEST 2010

Alexander Kapps wrote:
> Instead you want something like:
> except smtplib.SMTPException, msg
>     print "eroare: " + msg

Err, that's still concatenating a string and an exception object.

What *would* work is:

except smtplib.SMTPException, msg
      print "eroare: " + str(msg)

...not that it's particularly good coding style, what with hiding the 
traceback and all...



Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk

More information about the Python-list mailing list