Jump to content

Indy SMTP Failed to load libeay32.dll


DeHeus

Recommended Posts

I try to sent an e-mail using the Indy SMTP component, but I keep getting the error Failed to load libeay32.dll, no matter where I place the DLL's, it will not sent the e-mail.
The website runs as an ISAPI module in IIS, server OS is Windows 2016. DLL's are placed in C:\Windows\System32 and the folder where ISAPI dll is placed.

It works nice on my local machine, but throws error on the server.
We need SSL support as we are sending via office365.

The code:

iSMTP.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(iSMTP);
iSMTP.UseTLS    := utUseExplicitTLS;
TIdSSLIOHandlerSocketOpenSSL(iSMTP.IOHandler).SSLOptions.Method := sslvTLSv1_2;

iSMTP.Host     := 'fromsettings';
iSMTP.Port     := 587;
iSMTP.AuthType := satDefault;
iSMTP.Username := 'fromsettings';
iSMTP.Password := 'fromsettings';
iSMTP.Connect;

iSMTP.Send(iMessage); //<-- This throws error

What am I missing?

Link to comment
Share on other sites

You mean the DLL of my UniGui project? It's 32bit (Target platform is Win32).

I found the libeay32 and ssleay32 dll in C:\Program Files (x86)\FMSoft\Framework\uniGUI\SSL\dll\, from there I tried both the dll's from the x86 and x64 folder. But none work. Tried copying to same folder as UniGui DLL and to C:\Windows\System32.
Do I need install them, instead of just copying?

The only thing I haven't tried is rebooting the server. It's a production server so I hope I can avoid that.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 years later...

You need then to put the 32-bit versions of libeay32 and ssleay32 dll in the Windows\SYSWOW64 folder. (I agree that it is easy to believe that this folder is for 64-bit dlls, but it is the other way around because of historic reasons I believe. ) (Another options is probably to make sure your path is adjusted with an early entry pointing to your folder containing the libeay and ssleay)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...