473,322 Members | 1,562 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,322 software developers and data experts.

socket connection error 10061

1
i am using python smtplib mail server program ,it shows error connection refused target machine not connected 10061

source code
Expand|Select|Wrap|Line Numbers
  1.     import smtplib
  2.     sobj=smtplib.SMTP("smtp.gmail.com")
  3.     sender="abc@gmail.com"
  4.     rec="xyz@gmail.com"
  5.     msg=""hi"
  6.  
  7.     Subject: Test
  8.  
  9.     sobj.sendmail(sender,rec,msg)
Sep 15 '11 #1
1 2954
bvdet
2,851 Expert Mod 2GB
You may need to login. Your message has a syntax problem.
Expand|Select|Wrap|Line Numbers
  1. import smtplib
  2. sobj=smtplib.SMTP("smtp.abc.com")
  3. sobj.login("username", "password")
  4. sender="abc@xyz.com"
  5. rec="def@zyx.com"
  6. msg="""From: abc@xyz.com
  7. Subject: SMPT test
  8. Text"""
  9. sobj.sendmail(sender,rec,msg)
  10. sobj.quit()
Sep 15 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: anuradha.k.r | last post by:
hi, i have written a simple socket program in python to connect to a windows machine.On the server side i am running a windows socket program which works perfectly fine,my server program waites at...
5
by: pnigl | last post by:
Hello, i tried to set up a socket connection with the following code: #include <afxwin.h> #include <afxsock.h> int main()//int argc, char* argv { CAsyncSocket socket; socket.Create();
0
by: Tom Stepka | last post by:
Problem: We are experiencing an excessive (i.e. 16 - 20 seconds) delay when attempting to establish socket connection over the network, using the TcpLister.AcceptSocket() and...
6
by: Jason Chu | last post by:
situation: I'm uploading file to my application using a java applet sending the request (the file) through socket to my asp.net page. On my asp.net page, I've override the httpmodule to take in...
6
by: Sharon | last post by:
Hi all. I'm trying first time async socket connection. In all the examples i've seen, the server connection is closed when the message is complete. Is it common to close the connection after...
1
by: Ismail Demiralp | last post by:
Hi, I want to open a permanent socket connection to a service witch is running on the same computer. After I logged in on my php page, I start a session. After this a socket connection should...
5
by: Arno | last post by:
reposted with the right microsoft managed newsgroup ID: Sorry for the inconvinience Hi, I've written a class for client-socket connection, but I get a lot of times the error message "Unable...
0
by: kuguy | last post by:
Hi all, I'm new to the forums, so I hope this isn't in the wrong place... I have that "Software caused connection abort: socket write error" exception error that i've never meet before. ...
6
by: shelato | last post by:
Hi, I am able to open a socket connection to a micro controller, connected to a lynksys router, using visual basic code on a windows web site. Now I'm trying to open a socket connection using...
1
by: lubabalo | last post by:
Hi guys am having a problem connecting to a local mysql database server. I want to extract sum data from it but keeps on genarating a 10061 connection error help guys A.S.A.P
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
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: 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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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.