-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Sarà che sono fuso ma mi sono arenato su questo errore, devo catturare e gestire l'eccezione in oggetto, Ecco una parte del codice: ========================================================================= import smtplib, ecc... server = smtplib.SMTP(server) server.set_debuglevel(0) for you in you_list: print 'Invio a %s' % you[1] logging.info('Invio mail a %s' % you[1]) msg = createhtmlmail (html, text, subject, me, you[0], you[1]) try: mail_sended += 1 server.sendmail(me, you[1], msg.as_string()) #mittente rifiutato except SMTPSenderRefused: mail_sended -= 1 Send_Report(2) ============================================================================ ma mi ritorna questo errore: Traceback (most recent call last): ... File "./Mailman_Killer.py", line 213, in sendMails except SMTPSenderRefused: NameError: global name 'SMTPSenderRefused' is not defined la cosa che non capisco è che nelle doc SMTPSenderRefused è un eccezione sollevata da sendmail. sicuramente è perchè sono stanco e non vedo l'errore... Ciao - -- "La domanda che mi lascia piu' confuso e': 'Sono pazzo io o lo sono gli altri?'" - --Albert Einstein-- Scopel Emanuele. Server Chiavi: http://pgp.mit.edu Linux Registered User: #425729. jabber: [EMAIL PROTECTED] http://orso.homelinux.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI9i0jJ47VmkHcLCERApVEAJwLXSXGXFZxHHzivkZMdGjSOzsUIgCeNYOY bYi7nRkdz+FYO/uK8QoolIM= =GexR -----END PGP SIGNATURE----- _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python