Delphi Indy Socket Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about socket error 11004 delphi Stack Overflow the company Business Learn more about hiring developers or posting ads with socket error 10061 delphi us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is
Socket Error 10060 Delphi
a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Delphi XE Indy TIDSMTP and gmail : Socket Error 10060 up vote 1 down
Socket Error 11001 Delphi
vote favorite I'm having this 'Socket Error 10060 - Connection timed out' when trying to send emails using TIDSMTP, on a Delphi XE application. The same code works on a Delphi 2007 application on the same machine. No firewalls or anti-virus software installed. Same DLLs used on both applications (libeay32.dll / ssleay32.dll). Here is my code : idsmtp1.host = 'xxxx'; idsmtp1.port = 465; idsmtp1.username = 'x'; idsmtp1.password = 'x'; with socket error 10054 delphi ssl1 do begin SSLOptions.Method := sslvTLSv1; SSLOptions.VerifyMode := []; SSLOptions.VerifyDepth := 0; Destination := 'smtp.gmail.com:465'; host := 'smtp.gmail.com'; //OnStatusInfo := ssl1statusinfo; end; idsmtp1.iohandler := ssl1; idsmtp1.usetls := utUseImplicitTLS; idsmtp1.UseEhlo := true; idsmtp1.connect; // here the exception is throw delphi gmail indy share|improve this question asked Oct 5 '15 at 17:40 delphirules 1,17031537 Do not set ssl1.Destination and ssl1.Host manually. Connect() assigns them for you. Aside from that, try setting idsmtp1.Port after setting idsmtp1.UseTLS. Setting UseTLS may change the Port, so you want to make sure your chosen port is actually used. If that does not work, try using utUseExplicitTLS on port 587 instead. –Remy Lebeau Oct 5 '15 at 18:58 Removed 'ssl1.destination' and 'ssl1.host' and moved the port to the end of the code. Did not work on 465 and 587 / utUseExplicitTLS. But it's working on Delphi 2007... Is there any difference on XE / 2007 , can it use the same DLLS ? –delphirules Oct 5 '15 at 19:37 Here are a bizarre thing : after i put a breakpoint on 'onStatusInfo' of ssl1 , it stopped there for many times, and the message was sent ! I found out with the breakpoint, it works, without no... It's like it need
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack
Delphi Indy 10 Examples
Overflow the company Business Learn more about hiring developers or posting ads with us delphi indy documentation Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a delphi indy smtp example community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up recovering from “Connection Reset By Peer” Indy TCP Client up vote 7 down vote favorite 5 http://stackoverflow.com/questions/32954624/delphi-xe-indy-tidsmtp-and-gmail-socket-error-10060 How should I be recovering in this situation? The server crashes, thus the connection has been abnormally closed. Calls to almost everything result in "Connection Reset By Peer" exceptions. I seem to have fixed it by calling Disconnect on the TIdTCPClient object inside the except block, but it results in one final exception with the same message (which I have caught in the second try-except block). This is with Indy10 and http://stackoverflow.com/questions/10516579/recovering-from-connection-reset-by-peer-indy-tcp-client Delphi XE2. try if not EcomSocket.Connected then EcomSocket.Connect(); except on e: Exception do begin try EcomSocket.Disconnect(); except MessageDlg('Connectivity to the server has been lost.', mtError, [mbOK], 0); end; end; end; delphi tcp indy share|improve this question edited May 9 '12 at 20:50 asked May 9 '12 at 12:54 Andy Clark 132113 Did you try to debug into TIdTCPConnection.Disconnect in IdTCPConnection.pas? Maybe a OnDisconnect handler is executed and uses the connection. Or the NotifyPeer plays a role, see also the comments in the source about different scenarios –mjn May 9 '12 at 13:45 Freeing the object and creating a fresh new one will help (but not help to find the reason for the exception) –mjn May 9 '12 at 13:46 I am not so much concerned with why I am getting an exception when calling disconnect. I just want to know how to properly recover from a situation like this. –Andy Clark May 9 '12 at 14:14 This is hard to say without knowing what the program does –mjn May 9 '12 at 14:57 This is what I consider to be relevant (so feel free to ask for more). The client is our GUI, which issues commands to a server within
here for a quick overview of the site Help Center Detailed answers to any http://stackoverflow.com/questions/14756882/indy10-openssl-send-email-code-stopped-working-on-windows-8 questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about http://www.delphigroups.info/2/4/789975.html hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow socket error is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Indy10 + OpenSSL: send email code stopped working on Windows 8 up vote 3 down vote favorite Code stopped working on Windows 8. It works fine on Windows7, Windows XP... delphi indy socket I found a workaround for this issue: start application in Windows compatibility mode: Windows XP (Service Pack 3) - code working. Code not working if Windows compatibility mode is Windows 7. I run application as Administrator. Have already tried to switch off antivirus and firewall. I can send email with the same parameters using another smtp client, e.g. .Net SmtpClient. The problem is reproduced on different Windows 8 computers(home, office). I created simple test application. Code is written on Delphi XE, Indy 10.5.7, OpenSSL 1.0.1.3 dlls are placed in test.exe folder. Any ideas? Code: SSLHandler.MaxLineAction := maException; SSLHandler.SSLOptions.Method := sslvTLSv1; SSLHandler.SSLOptions.Mode := sslmUnassigned; SSLHandler.SSLOptions.VerifyMode := []; SSLHandler.SSLOptions.VerifyDepth := 0; SSLHandler.OnStatusInfo := IdSSLIOHandlerSocketOpenSSL1StatusInfo; SMTP.IOHandler := SSLHandler; SMTP.Host := 'smtp.gmail.com'; SMTP.Port := 587; SMTP.UseTLS := utUseExplicitTLS; SMTP.Username := FromAddress; SMTP.Password := AuthPassword; Email.From.Address := FromAddress; Email.Recipients.EmailAddresses := ToAddress; Email.Subject := Subject; Email.Body.Text := Body; SMTP.Connect; SMTP.Send(Email); SMTP.Disconnect; Output: SSL status: "before/connect initialization" SSL status: "before/connect initialization
error during sending email from my application. I'm using INDY component. Is there any way to get rid of that error? I'll be greatful for any hints. Jepes Riki Wiki Delphi Developer 2005-11-19 07:54:53 PM Re:socket error # 0 On 16 Nov 2005 01:53:52 -0800, jepes writes: Quote Does anybody know what exacly "Socket error #0" mean? Hoi Jepes You need to repost your question on the Borland news server to make everybody see it and possibly answer your question. When reposting use the newsgroup b.p.d.internet.winsock. Take a look here: