i will try to clarify it a bit better. i tried using XMailer Package to Send an Email. But it raised an Exception in this Code part:
I don't know XMailer but did you change it to expect OpenSSL 3?
First i thought i need to add the unit "ssl_openssl" to my uses clause for it to work. Lazarus then told me that this unit is deprecated and i should use ssl_openssl3. But that was not included in the package (Synapse) itself (From OPM) so the compiler did not find it. That is fixed for me now.
The fact it says it is deprecated doesn't mean it doesn't work. If the rest of your code still depends on OpenSSL 1, you can't just remove it.
But then i found that the XMailer package uses ssl_openssl internally so i did not need ssl_openssl3 but the correct dll's for ssl_openssl.
Don't MIX OpenSSL 1 and OpenSSL 3 inclusions. If XMailer uses ssl_openssl.pas or ssl_openssl1.pas, don't use OpenSSL 3 libraries (and uses in your own code).
thats why i went to "https://kb.firedaemon.com/support/solutions/articles/4000121705" and downloaded "OpenSSL 1.1.1w ZIP x86+x64" and but the 64 Bit DLL inside the same Folder as my .exe.
Woops. Yes, the files are correct for 1.1. (I looked at 1.0 which has different names).
the XMailer does still throw the same Exception ("Could not found the SSL library").
Do you still have ssl_openssl3.pas somewhere in your code? If so... it looks for OpenSSL 3, not OpenSSL 1.1.
As said... don't MIX them.
Now i did not touch XMailer anymore and tried it how it is described here: "https://wiki.freepascal.org/Synapse_-_Email_Examples". And i got it to work with SSL 1.1. i did not try it with SSl 3.
Ok.
So now the function from the Wiki works but using the TSendMail class from XMailer does not.
As far as I can see, the XMailer I found is 9 years old and uses SSL_OpenSSL. So the old 1.0 version. That one needs libeay32.dll and ssleay32.dll for OpenSSL 1.0.
So what XMailer version are you using?
If it's that old one, you would need to change it to use SSL_OpenSSL1 or SSL_OpenSSL3 depending on which OpenSSL you want to use.