469,270 Members | 1,764 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

smtplib.SMTP "no attributes SMTP"

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'

I beg to differ, it most certainly does. Right? :)

TIA

--
"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

Jul 18 '05 #1
2 8609
On Sat, 31 Jul 2004 13:32:59 -0400, rumours say that Copelandia
Cyanescens <sy*********@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?
I beg to differ, it most certainly does. Right? :)


Yes, the std lib smtlib.py does have an SMTP class.
--
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
Jul 18 '05 #2
Christos TZOTZIOYGeorgiou wrote...
On Sat, 31 Jul 2004 13:32:59 -0400, rumours say that Copelandia
Cyanescens <sy*********@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

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by aerobar2 | last post: by
4 posts views Thread by amywolfie | last post: by
1 post views Thread by Bruce W...1 | last post: by
reply views Thread by RDI | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.