indy

How can I get Delphi XE2 to talk to Google Calendar APIs over SSL?

时光怂恿深爱的人放手 提交于 2019-11-30 11:32:16
It's time for this question again, but this time with Delphi XE2. I am using the Indy version 10.5.8.0 that ships with XE2, and I have tried four different versions of the SSL dlls. I have tried 1.0.x latest, and about 3 different 0.9.8 versions (e,h,x,....). None of them works, when communicating to https:// urls at calendar.google.com. The author of the Delphi Google Calendar component at " Sync-components.com " ships his own binary openssl DLL runtimes that have no version information in it, but it seems to be a very small, very old version of SSL libs older than 0.9.8. The author of the

Delphi: Get MAC of Router

半城伤御伤魂 提交于 2019-11-30 09:17:53
I am using Delphi and I want to determinate the physical MAC address of a network device in my network, in this case the Router itself. My code: var idsnmp: tidsnmp; val:string; begin idsnmp := tidsnmp.create; try idsnmp.QuickSend('.1.3.6.1.2.1.4.22.1.2', 'public', '10.0.0.1', val); showmessage(val); finally idsnmp.free; end; end; where 10.0.0.1 is my router. Alas, QuickSend does always send "Connection reset by peer #10054". I tried to modify the MIB-OID and I also tried the IP 127.0.0.1 which connection should never fail. I did not find any useable Tutorials about TIdSNMP at Google. :-(

SendEmail with Indy components

拜拜、爱过 提交于 2019-11-30 08:33:54
问题 I try to send an email, but I have a problem, however, I found this code on the web: Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdMessage, IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP, IdBaseComponent, IdComponent, IdIOHandler, IdExplicitTLSClientServerBase, IdSMTPBase procedure SendSimpleMail; var Msg: TIdMessage; DestAddr: TIdEmailAddressItem; begin Msg := TIdMessage.Create(Self); //error here Msg.From.Text := 'name'; Msg.From

Authorization failure TIdHTTP over HTTPS

こ雲淡風輕ζ 提交于 2019-11-30 07:50:46
问题 I want to approach the Exchange webservice and handle XML SOAP composition (request) and parsing (response) myself. Therefore, THTPPRIO seems a bit overkill. I'm trying TIdHTTP but I'm stuck on the authentication; using Delphi XE2 update 4 with Indy 10.5.8.0 Here's the code: idHTTP1.Request.CustomHeaders.AddValue('SOAPAction','"http://schemas.microsoft.com/exchange/services/2006/messages/ResolveNames"'); IdHTTP1.Post('https://webmail.mailserver.nl/ews/exchange.asmx',TSRequest,TSResponse);

How to login to a Gmail account and get number of messages in a mailbox with TIdIMAP4?

别说谁变了你拦得住时间么 提交于 2019-11-30 07:23:29
How can I login to a Gmail account and get number of messages in the INBOX mailbox with TIdIMAP4 component ? To get the total number of messages in your Gmail's inbox, you need to, first connect to the Gmail IMAP server with your credentials, select Gmail's inbox mailbox and for that selected mailbox read the value of the TotalMsgs property. In code it may looks like follows (this code requires OpenSSL, so don't forget to put the libeay32.dll and ssleay32.dll libraries to a path visible to your project; you can download OpenSSL libraries for Indy in different versions and platforms from here )

recovering from “Connection Reset By Peer” Indy TCP Client

不打扰是莪最后的温柔 提交于 2019-11-30 07:19:59
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 Delphi XE2. try if not EcomSocket.Connected then EcomSocket.Connect(); except on e: Exception do begin try EcomSocket.Disconnect(); except MessageDlg('Connectivity to the

Indy TCP Client/Server with the client acting as a server

∥☆過路亽.° 提交于 2019-11-30 04:50:37
How can Indy's TIdTCPClient and TIdTCPServer be used in the following scenario: Client ---------- initate connection -----------> Server ... Client <---------------command------------------- Server Client ----------------response-----------------> Server ... Client <---------------command------------------- Server Client ----------------response-----------------> Server The client initiates the connection , but acts as a "server" (waiting for commands and executing them). The OnExecute approach of TIdTCPServer does not work well in this case (at least I am not getting it to work well). How

why does my D2009 exe produce emails with attachments named ATTnnnnn.DAT

穿精又带淫゛_ 提交于 2019-11-30 04:37:01
问题 Why does my D2009 exe produce emails with attachments named ATTnnnnn.DAT when the same source code compiled in D2007 produces emails with attachments correctly named with the original file name? I am using the respective Indy libraries that come with D2007 and D2009. Not having the original file name on the attachment prevents users from being able to double click the attachment to open it (typically attachments are Excel spreadsheets). Note: code is identical - just the compiler and Indy

Is it possible to recompile the DataSnap packages in Delphi XE with a new/different version of Indy?

我只是一个虾纸丫 提交于 2019-11-30 03:24:14
问题 Okay -- we have an interesting problem. Some background: Our main application uses Indy 10. However, we take the Indy 10 source and fix bugs in it, recompile, and install our own set of Indy components. We are migrating to Delphi XE and want to start using DataSnap. DataSnap requires the "official, shipping" version of Indy which is incompatible with our customized version of Indy. Our DataSnap servers will be separate applications, but since we have our own Indy installed in the IDE, we can

Delphi 2009, Indy 10, TIdTCPServer.OnExecute, how to grab all the bytes in the InputBuffer

旧时模样 提交于 2019-11-30 01:00:40
I am messing around with the Indy 10 supplied with Delphi 2009 and am having trouble with getting all the data from the IOHandler when OnExecute fires... procedure TFormMain.IdTCPServerExecute(AContext: TIdContext); var RxBufStr: UTF8String; RxBufSize: Integer; begin if AContext.Connection.IOHandler.Readable then begin RxBufSize := AContext.Connection.IOHandler.InputBuffer.Size; if RxBufSize > 0 then begin SetLength(RxBufStr, RxBufSize); AContext.Connection.IOHandler.ReadBytes(TBytes(RxBufStr), RxBufSize, False); end; end; end; AContext.Connection.IOHandler.InputBuffer.Size doesn't seem