Synapse,pop3send with SSL cannot login hotmail server lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- goomoo · 2016-11-09 10:17 I have referred the Synapse's sample article at http://synapse.ararat.cz/doku.php/public:howto:pop3samplessl and tried using SSLv2 and SSLv3 to login hotmail pop3 server, always login failed , Where is the problem? Thanks alot. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,  pop3send,blcksock; type   { TForm1 }   TForm1 = class(TForm)    btnTest: TButton;    Button1: TButton;    Memo1: TMemo;    procedure btnTestClick(Sender: TObject);    procedure Button1Click(Sender: TObject);     procedure AddToLog(s:string);  private    { private declarations }  public    { public declarations }  end;   ESMTP = class (Exception);  EPOP3 = class (Exception); var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.btnTestClick(Sender: TObject);var  pop3:TPop3Send;  ok:boolean;  s:string;begin  pop3:=TPop3Send.Create;  pop3.TargetHost:='pop-mail.outlook.com';  pop3.TargetPort:='995';  pop3.AutoTLS:=false;  pop3.FullSSL:=true;  //pop3.AuthType:=TPop3AuthType.POP3AuthAll;  pop3.Sock.SSL.SSLType:=TSSlType.LT_SSLv2;  pop3.UserName:='goomoozeng@hotmail.com';  pop3.Password:='password';     ok:=pop3.Login;   if ok then  begin    ShowMessage('login ok');    pop3.Logout;  end  else  begin    ShowMessage('login failed!');    s:=ansiToUtf8(pop3.ResultString);    ShowMessage(s);  end;   pop3.Free; end;   procedure TForm1.Button1Click(Sender: TObject);var  pop3: TPOP3Send;  i: integer;begin  pop3 := TPOP3Send.Create();  try    pop3.AutoTLS := false;    pop3.Username:='goomoozeng@hotmail.com';    pop3.Password:='password';    pop3.TargetHost:='pop- mail.outlook.com';    pop3.TargetPort := '995';    pop3.FullSSL := true;    pop3.Sock.SSL.SSLType := LT_SSLv2;     pop3.Sock.SSLDoConnect();    if not pop3.Login() then      raise EPOP3.Create('POP3 ERROR: Login');     AddToLog('POP3 Stat');    if not pop3.Stat() then      raise EPOP3.Create('POP3 ERROR: stat');    AddToLog('Stat: '+IntToStr(pop3.StatCount)+' msgs');    for i := 1 to pop3.StatCount do begin      AddToLog('POP3 Retr(' + IntToStr(i) + ')');      if not pop3.Retr(i) then        raise EPOP3.Create('POP3 ERROR: retr(' + IntToStr(i) + ')');      Memo1.lines.Add(' ');      Memo1.lines.Add('*** POP3 Retr(' + IntToStr(i) + ') *******');      Memo1.lines.AddStrings(pop3.FullResult);      pop3.FullResult.SaveToFile('mail_' + IntToStr(i) + '.msg');      if not pop3.Dele(i) then        raise EPOP3.Create('POP3 ERROR: dele(' + IntToStr(i) + ')');    end;   finally    pop3.Free;  end; end; procedure TForm1.AddToLog(s: string);begin  self.Memo1.Append(s);end; end. ---------------------------------------------------------------------- goomoo · 2016-11-09 11:14 When I tracked into TPOP3Send.Connect function,  I got the errorcode and error message are: FLASTERROR = 10091, FLASTERRORDESC = 'SSL/TLS support is not compiled!' then the function returns False. How to compile SSL/TSL support ? Code: [Select]function TPOP3Send.Connect: Boolean; begin   // Do not call this function! It is calling by LOGIN method!   FStatCount := 0;   FStatSize := 0;   FSock.CloseSocket;   FSock.LineBuffer := '';   FSock.Bind(FIPInterface, cAnyPort);   if FSock.LastError = 0 then     FSock.Connect(FTargetHost, FTargetPort);   if FSock.LastError = 0 then     if FFullSSL then       FSock.SSLDoConnect;   Result := FSock.LastError = 0;    //----> When goes there, FSock.LastError=10091, FLASTERRORDESC = 'SSL/TLS support is not compiled!', end; ---------------------------------------------------------------------- DonAlfredo · 2016-11-09 11:24 Add: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Uses ...., ssl_openssl; Could work ! ---------------------------------------------------------------------- goomoo · 2016-11-09 11:48 Quote from: DonAlfredo on November 09, 2016, 12:24:09 pmAdd: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Uses ...., ssl_openssl; Could work ! Thank you,DonAlfredo    , after I added ssl_openssl uses clauses, I got another error code and error message: FLASTERROR = 10091, FLASTERRORDESC = 'error:140650B5:SSLroutines:CLIENT_HELLO:no ciphers available' ---------------------------------------------------------------------- DonAlfredo · 2016-11-09 12:08 Mmmm ... dunno ... Try: pop3.live.com ? Or try another tls protocol ? ---------------------------------------------------------------------- PaVuk · 2017-06-01 21:57 Hi, Two .dll-s from synapse library have to present libeay32.dll ssleay32.dll Yes, I believe you've resolved it by now somehow, but someone is going to ask it again in few months... I've just experienced (and resolved) it now.