Re: [twsocket] Error in Sending mail
IMAGE cont...@image-zafar.com wrote:Hello, Hello, I enter my username and password, in SmtpCli (I don't need SSL). Perhaps they are overwritten by the demo application? Image or not image doesn't mater here but correct SMTP authentication, the easiest option is to use AuthType AutoSelect (cannot recall the exact names). If not authenticated the SMTP server does not allow relaying mail to another server. Also note that some servers require SSL (StartSsl command). -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Delphi XE5 . TSmtpCli and an Intraweb Applicaiton issue/ question
- Original Message - From: Rudy Poseika rpose...@cbautomation.com To: twsocket@lists.elists.org Sent: Monday, February 17, 2014 3:30 PM Subject: [twsocket] Delphi XE5 . TSmtpCli and an Intraweb Applicaiton issue/ question Intraweb 14.0.23 ICS-V8 gold - Oct 2013 -This worked (cannot say exactly when) - on an earlier iW and an earlier XE (XE2 at least) -the sending of EMAILS still work. -upon EXITING the iW app this error occurs: Error on call to Winsock2 library function accept: Either the application has not called WSAStartup, or WSAStartup failed This is not an ICS error message but Indy's. Where and how do you create the TSyncSmtpCli/TSmtpCli object? When I use the code below the mail is sent and there's no error upon exit a standalone IW app. procedure TIWForm1.IWButton1Click(Sender: TObject); var SyncSmtpCli: TSyncSmtpCli; begin SyncSmtpCli := TSyncSmtpCli.Create(nil); try SyncSmtpCli.MultiThreaded := True; SyncSmtpCli.Host := '192.168.178.200'; SyncSmtpCli.Port := '25'; SyncSmtpCli.RcptName.Text := 't...@domain.de'; SyncSmtpCli.FromName := 't...@domain.de'; SyncSmtpCli.HdrSubject := 'Test'; SyncSmtpCli.MailMessage.Text := 'Test'; SyncSmtpCli.ConnectSync; SyncSmtpCli.HeloSync; SyncSmtpCli.MailFromSync; SyncSmtpCli.RcptToSync; SyncSmtpCli.DataSync; SyncSmtpCli.QuitSync; finally SyncSmtpCli.Free; end; end; -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Basic HTTP Authentication over SSL
On Tuesday, February 18, 2014 2:01 PM [GMT+1=CET], Wayne Phipps wrote: Now we've come to implement the interface in Delphi, we've hit a hurdle. The process should be as follows: 1) Use HTTP POST to pass username and password parameters to login URL 2) A token string is returned if login was successful 3) The token is then used as Basic Authentication using HTTP GET to retrieve JSON from different API URL Have you tried to add the basic authenticate header line manually at runtime, something like: procedure THttpTestForm.HttpCli1BeforeHeaderSend(Sender: TObject; const Method: string; Headers: TStrings); begin if Method = 'GET' then Headers.Add('Authorization: Basic ' + TokenString); end; -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] OverbyteIcsFtpCli v8 (current) old problem resurfaces
On Wednesday, February 12, 2014 9:12 AM [GMT+1=CET], JohnC wrote: try to call FControlSocket.Close instead of FControlSocket.CloseDelayed. Does that fix it for you? From my testing that seems to fix the problem. Test against Filezilla server 0.9.41 and vsFTPd 2.0.5 Thanks for reporting. This change was added a couple of days ago (SVN rev. #1201): http://wiki.overbyte.be/wiki/index.php/ICS_Download -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] OverbyteIcsFtpCli v8 (current) old problem resurfaces
On Friday, February 07, 2014 9:25 AM [GMT+1=CET], Arno Garrels wrote: On Friday, February 07, 2014 2:20 AM [GMT+1=CET], twsoc...@kglt.net wrote: WaitUntilReady just loops looking for ftpReady and it never happens. as a quick and dirty fix, in DoneQuitAsync, I changed the StateChange from ftpInternalReady to ftpReady and put the FControlSocket.CloseDelayed before the statechange. Don't change the State but try to call FControlSocket.Close instead of FControlSocket.CloseDelayed. Does that fix it for you? -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TSslHttpCli HTTP proxy problem
On Thursday, January 09, 2014 6:21 PM [GMT+1=CET], Arno Garrels wrote: Since it works without a proxy fine it's IMO some bug in THttpCli or TSslHttpCli. In both cases the HTTPS-client establishes the SSL, the proxy just forwards the bytes. I have no idea how to fix it at the moment :( Indeed it is. The problem is that an invalid request string is sent to the server. Field TSslHttpCli.FPath includes the entire URL when method SendRequest() is executed. Since I do not have much spare time I just can post a quick and dirty workaround in unit OverbyteIcsHttpProt here: {code} {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} {$IFDEF USE_SSL} procedure THttpCli.SslHandshakeDone( Sender : TObject; ErrCode: Word; PeerCert : TX509Base; var Disconnect : Boolean); var // == added LProto, LUser, LPass, LHost, LPort : String; // == added begin [..] if not FProxyConnected then Exit; ParseURL(FURL, LProto, LUser, LPass, LHost, LPort, FPath); // == added try FNext := GetHeaderLineNext; StateChange(httpWaitingHeader); [..] {code} Hope that helps -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TSslHttpCli HTTP proxy problem
On Thursday, January 09, 2014 2:50 PM [GMT+1=CET], Chavdar Kopoev wrote: I can reproduce the problem using demo OverbyteIcsHttpsTst and squid proxy. I guess it's some bug in THttpCli or TSslHttpCli however haven't found the cause of the problem. The SSL handshake succeeds and after TSslHttpCli sent the GET request the HTTP-server just drops the connection. Hi Arno, Thanks for looking into the problem. Is the server really sending FD_CLOSE request, as far as I see debugging, or at some point ICS send FD_CLOSE and trigger the closure? The server just resets the connection (TCP with flags RST and ACK). If you have Wireshark installed you can take a look at my packet log: http://delphi.duodata.de/archiv/IcsSslHttpWithProxy.pcap -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] TSslHttpCli HTTP proxy problem
On Wednesday, January 08, 2014 9:27 AM [GMT+1=CET], Chavdar Kopoev wrote: Hello, it is my first posting here. I have following issue: When trying to download following URL: https://api.kambi.com/offering/api/v2/ub/group/featured/193190.json?lang=en_GBchannel_id=1client_id=2ncid=276901 https://api.kambi.com/offering/api/v2/ub/group/featured/193190.json?lang=en_GBchannel_id=1client_id=2ncid=276901 It should return 410 Gone or JSON content, depending on geo location of the client. And it works just fine using no proxy, or socks one. But when trying to tunnel the request using HTTP proxy, SSL fails. Hello Chavdar, I can reproduce the problem using demo OverbyteIcsHttpsTst and squid proxy. I guess it's some bug in THttpCli or TSslHttpCli however haven't found the cause of the problem. The SSL handshake succeeds and after TSslHttpCli sent the GET request the HTTP-server just drops the connection. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Error Message when using TSmtpCli
On Sunday, January 05, 2014 8:39 AM [GMT+1=CET], Florian Hector wrote: Hi All, I just started using ICS TSmtpCli for sending mails (still working with D7). Upon terminating my application, it reported some memory leak whenever the function of sending mails had been used. So before anything else, I upgraded the ISC package to the latest release. Ever since, I get an error message along the lines SmtpCli1.ProxyType: Property ProxyType does not exist. Then likely an old version of ICS is found. Make sure that the library path ( Tools | EnvironmentOptions ) does include either the path to the output directory that contains the right dcu files, this is by default icsroot\Lib\Debug\Win32\D7 *or* both the path to icsroot\Source and icsroot\Source\Include. At the same time remove any library path that points to an old ICS directory. When I try to compile the sample application OverbyteICSMailSnd, the compiler barks at a line where a variable of the type TSmtpProxyType is declared. I just did a fresh checkout of the latest SVN revision ( http://wiki.overbyte.be/wiki/index.php/ICS_Download ) and installed on Delphi 7. Cannot reproduce this issue. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] [Off Topic] Vote for Delphi on Code2013
- Original Message - From: François Piette francois.pie...@skynet.be To: 'ICS support mailing' twsoc...@elists.org Sent: Thursday, January 02, 2014 6:29 PM Subject: [twsocket] [Off Topic] Vote for Delphi on Code2013 [Off Topic] You can vote for your favorite language (I hope it is Delphi but you can vote for anything). I do not understand this page. How do you vote? Just by a click on the image? Just from the name I'd prefer pogoscript, whatsoever that is ;) -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] ICS, FireMonkey, Android, Windows and PostMessages
On Sunday, December 15, 2013 7:05 PM [GMT+1=CET], François Piette wrote: While busy at porting ICS to Android, I had the need of replacing Windows custom messages by something else which is portable across Windows and Android. Your PostMessage() doesn't take a window handle and seems to be a class method, how is that helpful to port existing code? It is useful for posting custom messages to a TForm. That's why there is no window handle. TMessagingSystem instance is tied to a form (A FireMonkey form by the way). And how about console applications which do not have a form? With my implementation you are able to create a 'window handle' as the message target in OS X as you are used to in Windows, in a thread or a console application or the main GUI thread just as you like. You pass the instance reference to who must post a message to the form. In the case of the demo program, it is a thread. A window handle cannot be used because it doesn't exist in Android. Window handles do not exist in OS X too but that can be emulated as I showed in ICSv8. The nature of PostMessage() and SendMessage() is that they take a target (call it handle). I emulated Windows' messaging as close as possible as it is needed to be able to run ICS with minimal changes. TIcsMessagePump implements the message pump (a thread-local singleton). Passing an object instance is valid for all operating system. That object is crafted for the given operating system and his interface is the same for all operating system. For non visual components, there is another code under development. You have access to the repository and you can have a look at it's current state. Will your port introduce a new incompatible source branch as it was the case with your Kylix port in the past? The difficult to port ICSv8 to Android isn't the messaging but the lack of AnsiString I already wrote an AnsiString class which does the required work. I saw it, that's far away from solving the problem! and ARCed objects as well as zero-based strings. ARC is much less an issue than I had expected. You can still mostly program like you have always done. The compiler replace your calls to Free and FreeAndNil by what is required when ARC is in action. The [weak] attribute is simply ignored when there is no ARC. Let's see and count the memory leaks and other issues caused by ARC-ed objects over the next years in your ported ICS source code. You will likely introduce bugs that are difficult to debug, EMBT itself is not able to prevent that in their own code since some releases now. Same for zero-based strings. This require some code reviews and changes but the result can be made backward compatible. Resistance to change is a well-known issue in HR management :-) Well, zero-based strings is a complety unnecessary mess IMO. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] install delphi Xe5
On Friday, November 01, 2013 7:24 PM [GMT+1=CET], {Dark_Ducke} wrote: Correct the path and managed to install more components are disabled for FireMonkey mobile aplication does not work for mobile? ICS currently does not support NextGen compilers. Currently ICS supports Win32, Win64 and OS X (beta). -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Mails not reaching destination...
On Wednesday, October 23, 2013 8:07 PM [GMT+1=CET], Erik Brännlund wrote: Hi! I have a very old version of ICS and D5. Anyway if I send an email to my gmail account it doesn't show up and it doesn't bounce back either. Have someone seen any such trouble before and knows what might be the cause of this. The mail sender is domain a.com and the SMTP server is domain b.com can this be the reason. Gmail requires SSL/TLS, the SSL/TLS support for D5 is buggy, you should at least upgrade your projects to Delphi 7 and use latest ICSv8. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Post data lost
On Saturday, October 12, 2013 2:21 PM [GMT+1=CET], Laurent Breysse wrote: Resolved: The issue came from AVAST antivirus, which is altering the connection content in some way. I reproduced that as well with AVAST **BUT** that doesn't seem to be the culprit here. When I run the Client from a different physical Host the timeout happens again (without any AV). HttpServer1PostDocument triggers however HttpServer1PostedData does not. When the connection is closed the posted data is received however treated as a new request and a 501 response is sent to client. We have a timing bug obviously since both client and server on localhost does work except when AVAST is installed. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Can't get https://yahoo.com with latest version ofTSslHttpCli
On Wednesday, October 09, 2013 5:33 PM [GMT+1=CET], Albert Wiersch wrote: I just upgraded to the latest version of ICS-V8 but I still cannot seem to get a reasonable result when fetching https://yahoo.com. Did that work with ICSv7? Is it a regression? -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Can't get https://yahoo.com with latest version ofTSslHttpCli
On Wednesday, October 09, 2013 5:52 PM [GMT+1=CET], Angus Robertson - Magenta Systems Ltd wrote: Using the sample OverbyteHttpsTst application, I get the below, but no body content. It looks like it goes through some redirects and switches to http from https. Indeed, it switches to non-SSL but still using port 443, and you then get an 10053 abort error. I've reproduced the same error using the browser demo. It's probably another error in the relocation code in the component, not disabling SSL, or deliberately setting SSL due to port 443, or maybe the opposite, not setting it due to http//:. In other words: How shall we handle this Location header: Location: http://yahoo.com:443/?s=https; ? -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HTTP server keep-alive timeout aborts GET request
On Wednesday, July 03, 2013 12:04 PM [GMT+1=CET], Tobias Rapp wrote: As the last changes in this area have been made by Arno I have included him in CC of this mail. Huh? It looks like Angus added hcSendData to the THttpConnectionState. I must admit that I have not yet updated my own webserver application with V8.01. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] IOS
On Sunday, June 30, 2013 5:50 PM [GMT+1=CET], Perry Kappetein wrote: Will ICS be IOS compatible in the future? My cristal ball says not very soon, if at all. The lack of AnsiString and new ARCed objects in NextGen compiler made the port rather difficult. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] ICS for iOS?
On Friday, June 07, 2013 7:34 AM [GMT+1=CET], Arno Garrels schrob: On Thursday, June 06, 2013 11:22 PM [GMT+1=CET], Eric Fleming Bonilha schrob: I would like to know if you have plans to have ICS for iOS, at least the TWSocket client I don't have plans perhaps someone else? Anyway it would be a huge effort because 1) NextGen compiler (for iOS) doesn't support AnsiString. 2) NextGen compiler requires Automated-Reference-Counting that EMBT did not implement backward compatible. 3) No dynamic link libraries are allowed in iOS, i. e., OpenSSL would have to be statically linked, so header files need be to changed. And there are likely a lot of difficulties I am not aware of. AFAICT Apple's CFSocket API is asynchronous. Blame EMBT for not providing an abstraction of asynchronous messaging in their 3rd FM release :( If FM wants to become a serious cross-platform framework, asynchronous messaging has to be one of the core feature. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Installing ICS v8 for FireMonkey
On Sunday, June 02, 2013 7:06 PM [GMT+1=CET], François Piette schrob: See the video recorded by Arno Garrels : http://francois-piette.blogspot.be/2013/06/installing-ics-for-firemonkey-in- delphi.html Thanks for uploading to YouTube. Unfortunately the quality is too bad, cannot read a single word in project manager, is it just me? Anyway I'll keep the original files for download from here: http://delphi.duodata.de/archiv/InstIcsV8_part1.avi.7z http://delphi.duodata.de/archiv/InstIcsV8_part2.avi.7z Both files are just ~2,5 MB compressed, however extract to more than 300 MB each. -- Arno -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be