indy

Using INDY 10 SMTP with Office365

给你一囗甜甜゛ 提交于 2019-11-29 10:55:34
I'm not familar with the INDY SMTP component. I want to send a mail with INDY and Office 365. Here is a nice topic which helped me a lot: What do the SMTP Indy component security and authentication properties do? But I did not figured out how to use SASL. Office365 adress is smtp.office365.com with port 587 and TLS. So I added an SMTP and an OpenSSL-IOHandler to my form and setted the properties. But I didn't work, the app is just freezing. I need to know how to use SASL with Office365. Thanks. Office365 only supports the LOGIN SASL on TLS port 587. The following code works fine for me when I

Delphi XE4 Indy compatibility issue between TBytes and TidBytes

江枫思渺然 提交于 2019-11-29 10:30:50
Today I try to compile my XE3 project in XE4. First problem that I face is with Indy's FTCPClient.Socket.ReadBytes() method. Before it was accepting TBytes type, now it insists on TidBytes. Definitions: TIdBytes = array of Byte; TBytes, Im not sure I guess it is generics something like TArray which is array of Byte. Question number 1: Why does compiler complain by saying that'[dcc32 Error] HistoricalStockData.pas(298): E2033 Types of actual and formal var parameters must be identical'. As I see they are already identical. Question number 2: Should I modify my source code with the each new

recovering from “Connection Reset By Peer” Indy TCP Client

一世执手 提交于 2019-11-29 08:27:43
问题 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();

How to get images from URL in Delphi

故事扮演 提交于 2019-11-29 05:55:32
I am looking for any code samples that show how to pull images from URL into Delphi TImage component. Thanks, With help of TMemoryStream and Indy component. uses GIFImg; procedure TForm1.btn1Click(Sender: TObject); var MS : TMemoryStream; GIf: TGIFImage; begin MS := TMemoryStream.Create; GIf := TGIFImage.Create; try IdHTTP1.get('http://www.google.com/intl/en_ALL/images/logo.gif',MS); Ms.Seek(0,soFromBeginning); Gif.LoadFromStream(MS); img1.Picture.Assign(GIF); finally FreeAndNil(GIF); FreeAndNil(MS); end; end; Code Worked for JPEG as well. For this project I used Indy components (like first

How to get images from URL in Delphi

自闭症网瘾萝莉.ら 提交于 2019-11-29 05:53:41
I am looking for any code samples that show how to pull images from URL into Delphi TImage component. Thanks, With help of TMemoryStream and Indy component. uses GIFImg; procedure TForm1.btn1Click(Sender: TObject); var MS : TMemoryStream; GIf: TGIFImage; begin MS := TMemoryStream.Create; GIf := TGIFImage.Create; try IdHTTP1.get('http://www.google.com/intl/en_ALL/images/logo.gif',MS); Ms.Seek(0,soFromBeginning); Gif.LoadFromStream(MS); img1.Picture.Assign(GIF); finally FreeAndNil(GIF); FreeAndNil(MS); end; end; Code Worked for JPEG as well. For this project I used Indy components (like first

Authorization failure TIdHTTP over HTTPS

两盒软妹~` 提交于 2019-11-29 05:18:30
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); TSRequest,TSResponse are UTF-8 TStringStreams, TSRequest contains the entire SOAP envelope IdHTTP1

How can I use NTLM authentication in a Delphi SOAP Web Service client?

天涯浪子 提交于 2019-11-29 05:13:47
For a Microsoft CRM project, we need NTLM authentication in the Delphi 2009 web service client. It looks like Indy 10 Tiburon already has experimental NTLM support . How can I activate the NTLM authentication for the THTTPRio component and use the logon information (user name, password, domain) of the destination web service server? Edit: it would also be helpful if there is a way to use other authentication methods than 'Basic', for example HTTP Digest access authentication . In the user name property of the WebNode subcomponent of the THTTPRio component, use the domain name followed by a

Indy 10 IdTCPClient Reading Data using a separate thread?

做~自己de王妃 提交于 2019-11-29 03:57:39
问题 Question: What I'm looking for is the most typical or best practice way to use a separate thread to receive data using an IdTCPClient in Indy 10. Background: The below code is a sample of what I'm trying to do with the actual data processing parts removed for clarity. The Idea of the Thread is to receive all data (Variable size with a header declaring the rest of the message length) and to then to parse it (That's what the HandleData procedure does) and trigger an Event Handler depending on

Using Gmails Outgoing SMTP from DELPHI(Indy) using TLS

北慕城南 提交于 2019-11-29 03:44:57
I am using INDY to send Email using the SMTP client on port 25 with no problem. Now I need to send an Email using a Gmail account and for that I need to use TLS. Can anyone provide a simple sample on how to do that. Thanks This code works for GMail: begin IDSMTP1 := TIDSMTP.Create; IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create; try with IDSMTP1 do begin Host := srvr.Host; Port := srvr.Port; if (srvr.needAuthentication = 'Y') then AuthType := satDefault else AuthType := satNone; IOHandler := IdSSLIOHandlerSocketOpenSSL1; if (srvr.secureMode = 'Y') then UseTLS :=

Indy 10 TCP server

故事扮演 提交于 2019-11-29 00:25:31
After a lot of searching I thought Indy TCP server would be the best to use on Instant messenger server I am working on. The only issue I am facing right now is broadcasting and forwarding message to other connected client, sending back response to the same client seems ok and doesn't hangs up other clients activity, but for forwarding message to other clients the mechanism that I know of is by using the aContext.locklist , and iterating between the connection list to find the client connection that is to receive the data. The problem here I think is that it freezes the list and doesn't