473,473 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 10179
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: aerobar2 | last post by:
When I debug my application I get "no symbols loaded" ================= 'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'MHSFire': Loaded...
4
by: amywolfie | last post by:
I would like to put code behind a Find button on a form which: 1) Performs a find based on a field on the form 2) If NO RECORDS ARE FOUND, then displays a custom "No Records Found" message box. ...
1
by: Bruce W...1 | last post by:
Can "No touch deployment" applications run in IE, like a Java Applet, or are they strictly Windows desktop applications? Thanks for your help.
0
by: RDI | last post by:
What's it mean? My prog runs fine. Then as soon as I press ok or cancel, the following is what's in the output area of the debugger. TIA -- RDI (remove the exclamation from the email...
0
by: feng | last post by:
Hi, I am having a strange problem right now and I don't even know how to go about it. Someone please help me! Any inputs will be highly appreciated. We have an application that has a VB.Net...
1
by: Anup | last post by:
In my form I and doing validations using 'Javascript' as I m using ASP1.1 and there is very less support for Validators there. //Code Behind private void Page_Load(object sender,...
1
by: dasayu | last post by:
Hi, I have a custom object called gridWidget. I am consistantly getting an error in FireFox when I click on an href, which calls a function defined on the object. The generated link looks similar...
11
by: CrostonScottish | last post by:
Can anybody help? I have this code i have put together so that when i select values for my combo boxes which are linked to values in lookup tables, it opens my "frmriskass" with only the...
1
by: indikamaligaspe | last post by:
Hi all, I am trying to get a PL/TCL trigger to update an audit table working. The problem is when I create the trigger on an exiting table, I get the following error "ERROR: can't read...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.