How to send email via SSL and Indy in Delphi 7 - delphi

I want to send email to Yahoo mail using Indy. But Yahoo uses 465 port with SSL connection. I don't know how to implement that in my program. I have read about TIdSSLIOHandlerSocketOpenSSL component on internet, but couldn't find such component in Delphi 7. Can anyone help?

I have found that Synapse library is much easier to use. Look at the code example I use: How To Use SMTP with TLS

In Delphi 6/7 the component was called TIdSSLIOHandlerSocket. This was Indy 8/9. It still uses Open SSL. I don't know why they changed the name in Indy 10.

Related

Why am I getting "Connection reset by peer" with Indy only on a HTTPS (SSL) site?

I am trying to use Indy HTTP (Delphi Seattle) to get the contents of a https webpage and I always seem to get Error 10054 - Connection reset by peer. Other sites seem to work just fine. The website in cause is https://www.adultwork.com. I have added the SSL, Cookie and Compressor components, but maybe I'm missing something, some settings, IDK... If anybody could help, it would be greatly appreciated.
I was able to reproduce the issue, and it is due to Indy's TIdIOHandlerSocketOpenSSL component only enabling TLS v1.0 by default.
Like many other sites nowadays, AdultWorks does not accept TLS 1.0 anymore. In fact, it doesn't accept TLS 1.1, either. It requires TLS 1.2. Once I enabled TLS 1.2 in the IOHandler's SSLVersions property, TIdHTTP.Get() was able to access the site without error.
Thanks both for pointing in the right direction! Seems like besides the TLS 1.2 part, I was also using outdated dlls. Using updated dlls and the TLS 1.2 version made things work.

WebSocket client implementations for Delphi

Are there free WebSocket client implementations for Delphi? I found only this one:
WebSockets Delphi Components
but it is not free.
Here is my open source library:
https://github.com/andremussche/DelphiWebsockets
I've added support for WebSockets to xxm. Not all handlers support the required IXxmRawSocket interface, but the Apache httpd module (xxmAHttpd) and the SCGI handler do, and I still get the best results with the standalone 'raw' handler xxmHttp. See more here.

Delphi 2010 DataSnap Client with HTTPS

I have a DataSnap server written in Delphi XE3, deployed as an ISAPI module with SSL.
I'm writing a client application for this server, but it has to be written in Delphi 2010 for now. I'm having trouble connecting to the server through HTTPS. I have no trouble connecting to the server through HTTP.
I can write a client in XE3 that connects through HTTPS and succeeds, so I know the server is working fine.
The error I receive is:
Protocol HTTPS can be used after an adequate instance of TDBXCommunicationLayer is registered with TDBXCommunicationLayerFactory.
I've googled the solution to a problem like this and was instructed to add DSHTTPLayer to the uses clause of my unit, and that works for HTTP, but it's not working for HTTPS.
Any ideas out there? Thanks a lot for your time.
I ended up using TIdHTTP and TIdSSLIOHandlerSocketOpenSSL components to connect via HTTPS. I parsed the JSON with a TJSONParser. Delphi 2010 doesn't support HTTPS through the TDSRestConnection.

DataSnap REST server - enable HTTP KeepAlive

I'm using Delphi XE2 to build a DataSnap HTTP REST server to run as a service on Windows 2008. I read somewhere that by default the HTTP 'KeepAlive' is disabled for DataSnap server projects, if so can somebody help as to how to enable this. Thanks.
The Server has a property KeepAlive, which should be set to true.

How to make a simple proxy server?

I wanted to create a simple proxy to my localhost(xampp). I've looked into IdHTTPProxyServer but there is no available example of how to use it.
my intention is to monitor the Post/Get request of my application at runtime just like a debugger.
my application will Post/Get through localhost:8080 and then my proxy will be served as a bridge to localhost:80
any suggestion or example?
I am using D2009, D2010 must support Unicode.
Thank you in advance.
I know it's not Indy, but Synapse (I use it with Lazarus) has a Proxy Server Example included which should work on Delphi too. It worked well for me on FPC. The Demo is included in the Sources you get here:
http://www.ararat.cz/synapse/doku.php/download
You may use Overbyte ICS TCP/IP library, on the "user made" page you have a lot of proxy samples, one is tgphttpproxy.

Resources