Send Email via Exchange Online with OAuth2 in Delphi and Free Pascal

Disclaimer: I no longer have access to an Office 365 Exchange Online environment, so I can’t re-verify some of the technical details in this post, especially the Exchange configuration steps. Microsoft’s portals, permissions and policies change over time, so please check them against Microsoft’s current documentation. The code and instructions are provided as-is, without any … Continue reading Send Email via Exchange Online with OAuth2 in Delphi and Free Pascal

Daraja Demo 13: Sign in with Microsoft Entra and call the Graph API from Object Pascal

Can a small Object Pascal HTTP server handle a modern OAuth 2.0 login and then talk to Microsoft's cloud APIs? With the Daraja HTTP Framework, yes. Demo 13 shows the complete flow in a handful of source files. You can find it here: demo/13_entra_msgraph (see the readme.md for the full description). What the demo does … Continue reading Daraja Demo 13: Sign in with Microsoft Entra and call the Graph API from Object Pascal

Automated FPCUnit testing for the Daraja HTTP Framework with GitHub Actions

Lazarus / Free Pascal CI without running your own build server Daraja is a compact and flexible HTTP server application framework for Object Pascal, built on Internet Direct (Indy). It comes with a unit test suite, and I wanted every push and pull request to run it automatically on both Windows and Linux, using Free … Continue reading Automated FPCUnit testing for the Daraja HTTP Framework with GitHub Actions

How To: Secure Delphi SMTP With OAuth2

How to: secure Delphi SMTP with OAuth2 for sending emails via Exchange Online. Full Example source code is available now on GitHub.

How to: Server-Sent Events with Indy HTTP Server (part 3)

In this part, the server application uses the Indy HTTP server uses SSE to continuously send events to the JavaScript EventSource. Part 3: the demo application, now streaming Ingredient #1: the HTML page with JavaScript The script has not changed, it reads two data items from the ping event: a time stamp in ISO 8601 … Continue reading How to: Server-Sent Events with Indy HTTP Server (part 3)

How to: Server-Sent Events with Indy HTTP Server (part 2)

In this second part, a server application uses the Indy HTTP server to provide a HTML page which uses SSE to update its content with data sent from the server. Part 2: the basic demo application, some client data added Ingredient #1: the HTML page with JavaScript The script now reads two data items from … Continue reading How to: Server-Sent Events with Indy HTTP Server (part 2)

How to: Server-Sent Events with Indy HTTP Server (part 1)

In this article, a server application uses the Indy HTTP server to provide a HTML page which uses SSE to update its content with data sent from the server. Server-Sent Events (SSE) is a server push technology enabling a client to receive automatic updates from a server via an HTTP connection, and describes how servers … Continue reading How to: Server-Sent Events with Indy HTTP Server (part 1)

Indy FTP LIST timeout with Delphi 11 in active mode (solved)

In the Indy issue tracker, a bug was reported which first appeared with Delphi 11. FTP LIST timeout with latest Delphi 11 (and idFTP) It is possible to reproduce the bug not only with Delphi 11 but also with Free Pascal. Reportedly the timeout also occurs with Delphi 10.4. If you want to reproduce it … Continue reading Indy FTP LIST timeout with Delphi 11 in active mode (solved)

How to: Let’s Encrypt certificates with Indy HTTP Server

This article guides you through the setup for a simple HTTPS server using Let's Encrypt certificates. Download the project source The example project is included in the Daraja demo folder at https://github.com/michaelJustin/daraja-framework/tree/master/demo/https. You may use the project IndyHttpsTest with Delphi 6 or later, or with the Lazarus IDE. This stand-alone project only requires the Indy … Continue reading How to: Let’s Encrypt certificates with Indy HTTP Server

Consuming Server-Sent Events (SSE) with Indy TIdHTTP and TIdEventStream

A new Indy HTTP client / JAX-RS server example is now available on GitHub. The server side generates Server-sent events. Server-sent events (SSE) is a technology enabling a browser to receive automatic updates from a server via HTTP connection. The example code uses TIdHTTP and TIdEventStream to connect to the server, and writes the incoming … Continue reading Consuming Server-Sent Events (SSE) with Indy TIdHTTP and TIdEventStream