Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral
  1. @Remy Lebeau: Thanks that worked like a charm... You were really helpful. Thanks for taking time to help me with this.
  2. Thanks @Remy Lebeau for your time. I received a network log from the production server. They said that it is actually connecting to outlook through proxy! See the image below: But I get the "Connection closed Gracefully" exception when I call IdIMAP.Connect(false).
  3. @Remy Lebeau: Thanks for your suggestion. I checked it but we use HTTP. So I used TIdConnectThroughHttpProxy and I investigated a bit more and adjusted code like this: p := TIdConnectThroughHttpProxy.Create(IdIMAP); io := TIdIOHandlerStack.Create(IdIMAP); p.Host :='x.x.x.x'; // Proxy server ip p.port :=1234; // Proxy server port p.Enabled := true; io.TransparentProxy:=p; IdIMAP.IOHandler := io; IdIMAP.Host := 'outlook.office365.com'; IdIMap.Port := 993; IdIMAP.Password := 'Pass123'; Now I get the "Connection closed Gracefully" exception when I call IdIMAP.Connect(false). Thanks for your time, Soji.
  4. No. The proxy doesn't require it's own authentication.
  5. Hi, I am trying to figure out how to connect to office 365 through a proxy server. My application is working well if I connect without a proxy. But now the requirement changed and direct connection to internet is not allowed and I have to use a proxy. I can connect to office 365 from the production machine through proxy using a browser. So the connection setup is good. Now I need to change my application to use a proxy. So I looked around and found that I have to use TIdIOHandlerStack and IdConnectThroughHttpProxy1 to achieve it. But the help document is not that great. So looking for suggestions/help. My code looks like this. type TForm1 = class(TForm) Button1: TButton; IdIMAP: TIdIMAP4; IdConnectThroughHttpProxy1: TIdConnectThroughHttpProxy; IdIOHandlerStack1: TIdIOHandlerStack; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin IdIMAP.Username := 'test@test.com'; // outlook user name IdIMAP.Password := 'xxxxx'; // outlook user password IdIMAP.Port := 993; // outlook server port IdIMAP.Host := 'outlook.office365.com'; // outlook server IdIMAP.AuthType := iatUserPass; IdConnectThroughHttpProxy1.Host := 'x.x.x.x'; // Proxy server IdConnectThroughHttpProxy1.Port := 1234; // Proxy server port IdIOHandlerStack1.TransparentProxy := IdConnectThroughHttpProxy1; IdIMAP.IOHandler := IdIOHandlerStack1; try Memo1.Lines.Clear; Memo1.Lines.Add('Trying to connect to server...'); if not IdIMAP.Connected then begin if IdIMAP.Connect(false) then Memo1.Lines.Add('Connected to server') else Memo1.Lines.Add('NOT Connected to server') end; Memo1.Lines.Add('Trying to login to server...'); if not(IdIMAP.ConnectionState in [csAuthenticated, csSelected]) then IdIMAP.Login; Memo1.Lines.Add('Logged in to server'); except on E: Exception do begin Memo1.Lines.Add('Error while connecting: ' + E.Message); end; end; end; When I try this, I get "Error while connecting: 403 forbidden error" Thanks for your time, Kind regards, Soji.
  6. Thanks @emailx45. I started exactly with same idea sometime back. Then I found some issue when we upgraded Delphi version. The *.dproj file changed and my search and replace failed or did not work with different build configurations. I created a tool to search and replace build version at that time. Thanks for your detailed answer. Much appreciated.
  7. Thanks @Anders Melander. I was also not looking for any utilities. Try to find a best solution within IDE/projects itself.
  8. Hi, I am looking for an easy option to set "version information" of multiple projects with in a project group at the same time. Is there any option already available wit the Delphi IDE? Going through each and every project and updating the version information for a particular build configuration is error prone and cumbersome. I have almost 75 projects in a project group. Don't want to click through each and every project and enter the version information for every release. Any best practices or suggestions to handle this situation? I use configuration manager to select a configuration to build all the projects in my development machine. (For release build I use a build server and MSBUILD) Kind regards, Soji.
  9. Thanks for all the inputs. CryptoLib4Pascal worked for me.
  10. @Kas Ob.: I spotted the same. Thanks for pointing it out. Yes. You have to use another package HashLib4Pascal from same authors. I use that package for PKDF2.
  11. Hi, I am looking for a Delphi AES encryption/decryption library to decrypt a text which is encrypted using power-shell script. Another application encrypts a text using power-shell and put it into a file. My Delphi application has to read the file and decrypt the string. This is the power-shell script to encrypt ( Powershell encrypt and decrypt ). I want to mimic the function fAESDecrypt() in Delphi. Anyone knows any libraries which can do this? If there is nothing out there which can do it, I am thinking about executing the power-shell from Delphi to decrypt it. I think that should be possible. Thanks in advance, Soji.
  12. Soji

    Delphi 10.4.1 upgrade

    Yes. That is right. I already "fixed" it. But it is really strange to say that I have to add "getit" right?
  13. I got an interesting message when I tried to upgrade my project from Delphi 10.3 to Delphi 10.4.1. It says I need to add "getit" package!. This is really a strange message. (There is no package named getit in my project group and I am sure I don't have any dependency to a package named getit.)