5
votes

Delphi 7 with Indy 10.5.8.0.

I apologise if this is rehashing previously asked questions, but I cannot solve this problem.

I am sending HTML emails with embedded images using the Indy TidMessageBuilderHTML to construct my html emails. This is very cool and works perfectly so far.

My problem now is to cater for SMTP servers that require SSL/TLS authentication. I have had so many problems with the OPENSSL DLL files and now it seems the 32 bit versions do not run on 64 bit etc. I want a workaround that avoids using the DLL files. (And preferably I need to keep it single exe. application).

My question then: I want to use Indy V10 as it is without having to ship the OPENSSL dll's. Is there any way to do this? Are there no available delphi SSL libraries that support Indy ssl (TIdSSLIOHandlerSocketOpenSSL)?

Also, I am open to other suggestions that will facilitate my html emails with embedded images. Thank you.

1
if you want "everything" into your exe, you need to embed the dlls, before all other units in the uses clause of your dpr file, add a unit that it's sole purpose is to extract the dlls from the application on initialization. Seems odd that your dlls don't work on x64...user497849
The static linking of SSL appears to be something that nobody does, probably because the C library dependencies are too complex. Embedding and then loading the SSL dll appears to be your only option, and yes, a 32 bit DLL will work on 64 bit windows. Why wouldn't it?Warren P
Just a sidenote. You can get Indy compatible OpenSSL libraries from here. There you will find also the 64-bit versions of the libraries.TLama
Thank you! My frustration got the better of me. There were different versions of the dll's installed by other applications on the testing pc. I do not know which one was being used, but now the correct version resides in my program folder which is the priority 1 search path according to my understanding. This works. I will ship the DLL's. Thanks again trendsetters!Nico Steyn
SSLBlackbox package of our SecureBlackbox ( see eldos.com/sbb/delphi-ssl.php ) provides native implementation of SSL/TLS (including the functionality that is missing in OpenSSL) and has IOHandler class for IndyEugene Mayevski 'Callback

1 Answers

2
votes

You asked about libraries that support TIdSSLIOHandlerSocketOpenSSL class, but that is exactly the class that requires the external DLLs, in its TIdSSLIOHandlerSocketOpenSSL.StartSSL method.

The simplest solution is ship the DLLs (32 bit or 64 bit version), and also check at runtime the DLLs presence before attempt to invoke your "SendMail" function, this way you can present your users more understandable error messages, indicated exactly which files are expected to be found by your application.