473,585 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Difficulty Sending email from Python

The Python Library Reference Section 12.2.13 gives an example of how
to send a simple text message. When I try that, my program seems to
start and run OK, my firewall asks for permission for PythonWin to
access the internet, then it gets to the line s.connect()
and I get an error message whose last two lines are

raise SMTPServerDisco nnected("Connec tion unexpectedly closed")
SMTPServerDisco nnected: Connection unexpectedly closed

Now, the odd thing is that when I use my newserver (Free Agent
1.21/32) and try to send email in response to an article I have read,
I get the same error message: Connection unexpectedly closed.

Obviously the problem is not in Python, but in something in my system.
I would welcome suggestions to help untangle it. I have a DSL
connection to SBCglobal.net. I usually get and send my email through
an address at texas.net, not SBCglobal.

Any ideas?

Thanks,

Ben Fairbank
Jul 18 '05 #1
2 2471
Ben Fairbank:
my firewall asks for permission for PythonWin to access the internet [...]I get the same error message: Connection unexpectedly closed. [...]Any ideas?


Your firewall.

--
René Pijlman
Jul 18 '05 #2
Ben Fairbank fed this fish to the penguins on Friday 21 November 2003
21:32 pm:


The Python Library Reference Section 12.2.13 gives an example of how
to send a simple text message. When I try that, my program seems to
start and run OK, my firewall asks for permission for PythonWin to
I presume you have given (and saved for future -- I've seen a few
applications that seem to give up during the time it takes to respond
to a ZoneAlarm prompt) the permission.

Now, the odd thing is that when I use my newserver (Free Agent
(Free)Agent is a news CLIENT.
1.21/32) and try to send email in response to an article I have read,
I get the same error message: Connection unexpectedly closed.
Are both the Python script and FA configured to use the same SMTPd as
your main email client? Same host, same user (if needed).
-- =============== =============== =============== =============== == <
wl*****@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
=============== =============== =============== =============== == <
Bestiaria Home Page: http://www.beastie.dm.net/ <
Home Page: http://www.dm.net/~wulfraed/ <


Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2369
by: Gerhard Häring | last post by:
On my mailserver (running a recent Postfix snapshot) I get this since a few hours: mylene:/var# mailq -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- DA10713E37 1617 Wed Sep 3 11:32:46 gh@ghaering.de (lost connection with mail.python.org while sending end of data -- message may be sent more than once)...
0
522
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils import mimetypes import os,string
12
1986
by: johnny.karlsson | last post by:
Hi, I'm working on a project were a need to be able to upload firmware to a microcontroller based Ethernet device. But because of the memory constraints the controller can only handle packages of 300 bytes each time. So therefore the firmware file must be sent in chunks and i need a header in each file describing which part of the file it is...
4
3561
by: David | last post by:
I'm wondering if python is capable of fairly precise timing and also sending data out the parallel port. For example ; making a 7.5 KHz square wave come out of one of the data pins on the printer port. I've tried to help myself with this one but searching in the "Python Library Reference" that installed with my version, yielded nothing...
5
23790
by: Kun | last post by:
i have the following code: ---------------------------------- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From = 'xxxx@xxxx.xxxx.edu'
1
2969
by: Grzegorz ¦lusarek | last post by:
Hi all. I sending email using standard python modules smtplib, email, coding email in utf but subject of message is not coded properly. In subject i use my national characters (polish) and after send i get XX in place these characters. Here is the code Message = email.message_from_string(pMessage) Message.set_charset('utf-8') Message =...
14
9882
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = 'sridhar_kasturi@satyam.com' toAddress = 'sridhar_kasturi@satyam.com' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib
2
1192
by: vishalgupta | last post by:
when i use the code : private void Report(int var) { var++; String ToEmail = ""; String FromEmail = ""; String Bdy = ""; ToEmail = System.Configuration.ConfigurationManager.AppSettings; FromEmail = System.Configuration.ConfigurationManager.AppSettings;
1
1470
rhitam30111985
by: rhitam30111985 | last post by:
Hi all .. i am trying to do something really weird ... here is my code : import os os.system("mail -s test xxx@gmail.com asdaskdjkasdaasdad")
0
7836
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
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 we have to send another system
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.