Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi and Indy with SSL

Tags:

ssl

delphi

indy

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.

like image 815
Nico Steyn Avatar asked Nov 05 '22 01:11

Nico Steyn


1 Answers

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.

like image 76
jfoliveira Avatar answered Nov 09 '22 07:11

jfoliveira