smtplib.SMTP "no attributes SMTP"

Copelandia Cyanescens synesthesia at invalid.net
Sat Jul 31 15:24:01 EDT 2004


Christos TZOTZIOYGeorgiou wrote...

> On Sat, 31 Jul 2004 13:32:59 -0400, rumours say that Copelandia
> Cyanescens <synesthesia at invalid.net> might have written:
> 
>>Python Python 2.3.4, Windows, "clean" install, using the example code
>>given in the documentation, I get this...
>>
>>Traceback (most recent call last):
>>  File "C:\projects\email\email.py", line 24, in ?
>>    server = smtplib.SMTP('mail.xxxxx.xxx')
>>AttributeError: 'module' object has no attribute 'SMTP'
> 
> Have you created a file smtplib.py somewhere in your python path?
> Perhaps you named as such the file with the example code from the
> documentation?

No, I saved the code as email.py... BUT... you hit the nail on the head
with the file name suggestion. The error disappears if I rename to
something like abcdef.py. I'll bet dollars to doughnuts that smtplib
references a module called email.py, huh? <grin>

Thanks! I knew it had to be something obvious and easy. :)

-- 
"I spent several years in a North Vietnamese prison camp, in the
dark, fed with scraps. Do you think I want to do that all over
again as vice president of the United States?"

                                             -- Sen. John McCain




More information about the Python-list mailing list