Re: sendmail error

2010-08-31 Thread Thomas Jollans
deed. > > > > > From: Thomas Jollans > To: python-list@python.org > Sent: Tue, August 31, 2010 4:46:58 PM > Subject: Re: sendmail error > > On Tuesday 31 August 2010, it occurred to sandric ionut to exclaim: > > Hello: > >

Re: Fw: sendmail error

2010-08-31 Thread Alexander Kapps
Chris Withers wrote: 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. OUCH! What a stupid error. Thanks for correction. :-) What *would* work is: except s

Re: sendmail error

2010-08-31 Thread Chris Withers
Thomas Jollans wrote: I struggle to imagine what one might do to a piece of code to garble it this badly. You viewed the text/plain part of his message, the text/html part showed the code almost correctly, complete with pasted-from-IDE colour formatting ;-) Chris -- Simplistix - Content Man

Re: Fw: sendmail error

2010-08-31 Thread Chris Withers
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 pa

Re: sendmail error

2010-08-31 Thread sandric ionut
use I would not receive the message. Your replays were enough to make me unsubscribe from the list I.S. From: Thomas Jollans To: python-list@python.org Sent: Tue, August 31, 2010 4:46:58 PM Subject: Re: sendmail error On Tuesday 31 August 2010, it occurred t

Re: sendmail error

2010-08-31 Thread Thomas Jollans
On Tuesday 31 August 2010, it occurred to sandric ionut to exclaim: > Hello: > > I have a script for sending email from python (it is attached bellow). When > I am launching the script I get the error: > TypeError: cannot concatenate 'str' and 'type' objects if I use > sys.argv[1], but if I input

Re: Fw: sendmail error

2010-08-31 Thread Alexander Kapps
sandric ionut wrote: Three things: When quoting code, do it exactly, and without wordwrap in your mail program. There are so many typos in that code sample that it's useless, presumably because you didn't use copy/paste The code was COPY and PASTE -> presume wrong When quoting an

Fw: sendmail error

2010-08-31 Thread sandric ionut
- Forwarded Message From: sandric ionut To: Dave Angel Sent: Tue, August 31, 2010 3:56:40 PM Subject: Re: sendmail error From: Dave Angel To: sandric ionut Cc: Python List Sent: Tue, August 31, 2010 2:49:29 PM Subject: Re: sendmail error

Re: sendmail error

2010-08-31 Thread Dave Angel
sandric ionut wrote: Hello: I have a script for sending email from python (it is attached bellow). When I am launching the script I get the error: TypeError: cannot concatenate 'str' and 'type' objects if I use sys.argv[1], but if I input from the begging an email address like "em...@email.com

sendmail error

2010-08-31 Thread sandric ionut
Hello: I have a script for sending email from python (it is attached bellow). When I am launching the script I get the error: TypeError: cannot concatenate 'str' and 'type' objects if I use sys.argv[1], but if I input from the begging an email address like "em...@email.com", the script is w