The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,482 other followers

Archive for the ‘Indy’ Category

Indy10, TIdSMTP, how to get protocol log?

Posted by jpluimers on 2020/12/17

Indy is great, but not well documented so: [WayBack] Indy10, TIdSMTP, how to get protocol log? I try to get log from SMTP communication, like this (copy from wiki): {code} S: 220 smtp.example.com ESMTP P… – Jacek Laskowski – Google+

Q

Indy10, TIdSMTP, how to get protocol log?

I try to get log from SMTP communication, like this (copy from wiki):

{code}
S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.com
S: 250 smtp.example.com, I am glad to meet you
C: MAIL FROM:<bob@example.com>
S: 250 Ok
C: RCPT TO:<alice@example.com>
S: 250 Ok
C: RCPT TO:<theboss@example.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <bob@example.com>
C: To: Alice Example <alice@example.com>
C: Cc: theboss@example.com
C: Date: Tue, 15 January 2008 16:02:43 -0500
C: Subject: Test message
{code}

but without success :-(

I try use many events from TIdSMTP, TIdLogEvent, TIdSSLIOHandlerSocketOpenSSL but result is low level like bytes, status etc. not true SMTP log.

How to do it?

A

Sending stuff still might be tough, so you might want to consider alternatives too: [WayBack] I need to add to the REST server the ability to send emails with attachments of different types. Which library is best to use? Indy or maybe ICS? Of cou… – Jacek Laskowski – Google+

Q

I need to add to the REST server the ability to send emails with attachments of different types. Which library is best to use? Indy or maybe ICS? Of course with SSL/TLS support.

A

Dany Marmur's profile photo

+Balázs Szakály, YES! Synapse. Let’s get people using it more. You can give it some criticism surely, but consider the pro’s:

It is straight-forwardly-written so when you hit a wall you can read the code easily (compared to other solutions),

You can inherit, extend and extrapolate, re-use and tweak,

Very Delphi-ish (TMimeMessages = TStringList or some such, not at at devmachine atm)

Compact and free!

Quite stable too.

–jeroen

Posted in Communications Development, Delphi, Development, Indy, Internet protocol suite, SMTP, Software Development | Leave a Comment »

Delphi: Download multiple files in multiple parts at the same time, support resuming, gzip-encoded files, cookies, logging to websites using POST and so on

Posted by jpluimers on 2020/08/05

If I ever need to download multiple files in multiple parts at the same time, support resuming, gzip-encoded files, cookies, logging to websites using POST and so on, then I need to look at [WayBack] http – Delphi- downloading files from the web with sockets – Stack Overflow.

–jeroen

Posted in Delphi, Development, Indy, Software Development | Leave a Comment »

Delphi Indy “SSL routines:SSL23_GET_CLIENT_HELLO:http request” – means you get an http request, but expecting an https request

Posted by jpluimers on 2018/12/05

A client got this with Delphi Indy “SSL routines:SSL23_GET_CLIENT_HELLO:http request” and was confused.

The message means you get an http request, but are expecting an https request.

If you really want to, you can have one component service both http and https requests, though most of the time you really do not want to: you want to phase out http whenever possible.

Related: [WayBack] delphi – Can a single TIdHTTPServer component handle http and https request in the same time? – Stack Overflow

–jeroen

Posted in Delphi, Development, Indy, Software Development | Leave a Comment »

Some Indy SSL Perfect Forward Secrecy links

Posted by jpluimers on 2018/10/18

Some links on Indy SSL Perfect Forward Secrecy especially for the [WayBackSSL_CTX_set_ecdh_auto method that was introduced in OpenSSL 1.0.2.

Indy now has it built in: [WayBack] Patches from Jeroen Wiert Pluimers: · graemeg/indy@659f629 · GitHub (this is on a regular git mirror of the official Indy svn repository).

–jeroen

 

Posted in Delphi, Development, Indy, Software Development | 1 Comment »

Indy Sockets and getting a description on the connection depends on the direction

Posted by jpluimers on 2018/05/29

From my Indy gitter archive:

@jpluimers
From a TIdIOHandlerSocket or TIdSocketHandle: is it possible to see who has initiated the connection? i.e. if it’s Binding.Peer that initiated to Binding.IP or the other way around?

@rlebeau
A socket is bidirectional, it doesn’t know or care which direction the connection was initially established. You will have to keep track of that yourself based on whether the socket is coming from a client component or a server component.

@jpluimers
I was afraid so. No problem: thanks for confirming.

So I made a helper class for TIdSocketHandle that gets you a SummaryString based on a direction enumeration: TIdSocketHandleHelper.

Notes:

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Indy, Software Development | Leave a Comment »

 
%d bloggers like this: