indy

Indy and smtps: cannot connect

我的未来我决定 提交于 2020-01-04 06:58:05
问题 I am trying to send emails from smtps (secure smtp) using Indy and the technique exaplined in this Marco Cantù article. This is what I am using: object SMTP: TIdSMTP IOHandler = IdSSLIOHandlerSocketOpenSSL1 SASLMechanisms = <> UseTLS = utUseExplicitTLS Left = 32 Top = 196 end and SMTP.Host := 'smtps.pec.aruba.it';; SMTP.Port := 465;; SMTP.Username := 'myaddress@pec.it'; SMTP.Password := 'myPassw0rd'; MailMessage.Encoding := meDefault; MailMessage.From.Address := 'myaddress@pec.it';

Indy and smtps: cannot connect

左心房为你撑大大i 提交于 2020-01-04 06:57:28
问题 I am trying to send emails from smtps (secure smtp) using Indy and the technique exaplined in this Marco Cantù article. This is what I am using: object SMTP: TIdSMTP IOHandler = IdSSLIOHandlerSocketOpenSSL1 SASLMechanisms = <> UseTLS = utUseExplicitTLS Left = 32 Top = 196 end and SMTP.Host := 'smtps.pec.aruba.it';; SMTP.Port := 465;; SMTP.Username := 'myaddress@pec.it'; SMTP.Password := 'myPassw0rd'; MailMessage.Encoding := meDefault; MailMessage.From.Address := 'myaddress@pec.it';

Downloading list of files from remote FTP

☆樱花仙子☆ 提交于 2020-01-04 02:44:27
问题 I'm getting a problem using the TidFTP component. I'm able to connect with the server using a code like this vFileList := TStringList.Create; oClientFTP := TidFTP.Create(nil); oClientFTP.Port := PortFTP; oClientFTP.Host := IPHost; oClientFTP.UserName := UserFTP; oClientFTP.Password := PasswordFTP; After getting several files from the StringList (this one has exactly 778 elements) when the element no. 137 is retrieved the exception EIdAcceptTimeout is raised with "Accept timed out." message.

Why does Indy Project HttpClient Get() give code 500 on some URLs which work fine in web browsers?

半腔热情 提交于 2020-01-03 11:04:04
问题 I have several URLs which work just fine in all browsers, but if I try to get the page content using Get() of the Indy Http client, it returns error code 500, internal server error. This is with the latest Indy SVN build (4981). Here is my example code. All that is needed for this is Delphi with Indy components and a form with a button and a memo. procedure TForm1.Button1Click(Sender: TObject); var HTTPCLIENT1: TIdHTTP; begin try try HTTPCLIENT1 := TIdHTTP.Create(nil); Memo1.Clear; with

IdHTTP to ensure push data to Ubidots (FMX, WIN32)

岁酱吖の 提交于 2020-01-03 05:09:29
问题 I can push an encrypted piece of humidity data up to my Ubidots cloud database by simply loading the following url in a web browser: https://industrial.ubidots.com/api/v1.6/devices/MYDEVICENAME/?token=MYTOKENHERE&_method=post&humidity=15.9 When I do that, I get the success response in the browser window {"humidity": [{"status_code": 201}]} and the data shows up in my data table on Ubidots. Now, I want to do this from an FMX app (C++ on Win32) without a visible browser, and I would like to

Delphi TIdHTTP POST is very slow vs GET

回眸只為那壹抹淺笑 提交于 2020-01-03 03:27:08
问题 Delphi 2009 I recently switched from multiple GET requests to a single POST which I thought would be more efficient but it has turned out to be much slower. It went from 1-2 seconds to 8-10 seconds and I can't figure out why. example unit Unit4; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP; type TForm4 = class(TForm) d: TIdHTTP; Memo1: TMemo; Button1: TButton;

Delphi - Simple TCP client / server using Indy to check clients status

ぃ、小莉子 提交于 2020-01-01 19:29:07
问题 I started playing with Indy 10 (from Delphi XE3) and TCP connections recently. For now, I am trying to create a simple server application to check clients status. But when I try to deactivate TCPServer with some client already connected, clients do get disconnected but TCPServer stops answering. I read somewhere that TCPServer should handle client's disconnection without problems. Must I add some code on OnExecute event to solve this problem? Here is the code: procedure TfrmMain

Delphi XE: idHttp & Request.Range, a bug?

青春壹個敷衍的年華 提交于 2020-01-01 18:16:13
问题 I have Delphi XE. I try to set Request.Range of idHttp but I cannot do this. Delphi doesn't allow me to do this neither at design time nor at run time. E.g. I set '6000-' in a design time -> a property gets empty all time. I do (in a thread): Downloader.Request.Range:=(IntToStr(DFileStream.Position) + '-'); synchronize(procedure begin showmessage(Downloader.Request.Range) end); showmessage(Downloader.Request.Range) shows me nothing (an empty string). I checked a request in HTTPAnalyzer -> my

Get internet time in delphi

六眼飞鱼酱① 提交于 2020-01-01 10:17:20
问题 i want to get time and date from internet i used following code IdDayTime1.ReadTimeout := 5000; IdDayTime1.Host := 'www.time.windows.com'; IdDayTime1.Port := 37 ; Label1.Caption := IdDayTime1.DayTimeStr; but i get : socket error # 11004 whats is this and what did i do wrong my internet and other things are ok 回答1: DayTime protocol is not the NTP protocol. DayTime uses port 13, not 37. 37 is used by the Time protocol, which, again, in not the NTP protocol, which uses 123 (UDP). I do not know

Get internet time in delphi

蹲街弑〆低调 提交于 2020-01-01 10:16:20
问题 i want to get time and date from internet i used following code IdDayTime1.ReadTimeout := 5000; IdDayTime1.Host := 'www.time.windows.com'; IdDayTime1.Port := 37 ; Label1.Caption := IdDayTime1.DayTimeStr; but i get : socket error # 11004 whats is this and what did i do wrong my internet and other things are ok 回答1: DayTime protocol is not the NTP protocol. DayTime uses port 13, not 37. 37 is used by the Time protocol, which, again, in not the NTP protocol, which uses 123 (UDP). I do not know