473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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 SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: 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 2463
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.netcom.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
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...
0
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...
12
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...
4
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...
5
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 =...
1
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...
14
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'...
2
by: vishalgupta | last post by:
when i use the code : private void Report(int var) { var++; String ToEmail = ""; String FromEmail = ""; String Bdy = ""; ToEmail =...
1
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.