- Windows 7 64 bit
- Delphi 5
- Indy 10.6.2.5499
I know most of us have nervous ticking with this problem. But in any case I lost some hours already without result to try different ssl dlls one by one.
In every case I get my favorite "Could Not Load SSL Library" exception.
I reinstalled Indy with previously deleted old Indy and so on. I went this way more than 10 times in my life but here again...
Maybe you see some specific in my environment or so...
Code:
SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
SSLHandler.SSLOptions.Method := sslvTLSv1;
FIdSMTP := TIdSMTP.Create(nil);
FIdSMTP.SASLMechanisms.Clear;
FIdSMTP.IOHandler := SSLHandler;
FIdSMTP.AuthType := satDefault;
FIdSMTP.UseTLS := utUseExplicitTLS;
FIdSMTP.Host := 'mx.freenet.de';
FIdSMTP.Port := 587;
FIdSMTP.Password := 'xxxxx';
FIdSMTP.Username := 'xxxxx';
FIdMessage := TIdMessage.Create(nil);
FIdMessage.CharSet := 'windows-1252';
FIdMessage.From.Address := 'xxxxx';
FIdMessage.ContentType := 'multipart/mixed';
FIdMessage.subject := subject;
FIdMessage.Recipients.EMailAddresses := email;
FHTML := TIdText.Create(FIdMessage.MessageParts, html);
FHTML.ContentType := 'text/html';
FIdSMTP.ConnectTimeout := 5000;
FIdSMTP.ReadTimeout := 5000;
try
FIdSMTP.Connect;
FIdSMTP.Send(FIdMessage);
FIdSMTP.Disconnect;
except
on e: Exception do
begin
ShowMessage(WhichFailedToLoad());
showmessage('Cannot send mail: ' + #13 + e.Message);
end;
end;
SSLHandler.Free;
FIdSMTP.Free;
FIdMessage.Free;
FHTML.Free;