[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Problem in Turbo Delphi 2006 with POP3 and SSL connection

Posted on 2007-11-26
11
Medium Priority
?
1,515 Views
Last Modified: 2012-06-21
I had an application compiled with Delphi 7 that did access a POP3 server in SSL mode.
I used a TIdPOP3 and a TIDSSLIOHandlerSocket component and it worked fine
Now I am migrating to Turbo Delphi 2006
I notice I have to use TIDSSLIOHandlerSocketOpenSSL (?) component instead so I just did change that in the code...
But running the newly compiled application, it hangs forever on the Connect method on the POP3 component
What did I miss ?
Some working example ?
0
Comment
Question by:LeTay
  • 5
  • 4
  • 2
11 Comments
 
LVL 28

Expert Comment

by:2266180
ID: 20349516
you missed a very important detail:
delphi 7 comes with indy 9. delphi 2006 comes with indy 10.
then, there is another small detail:
- was your application made in the IDE (you dropped the components on the form?) if so, chaning in code will not suffice, since you also have to change the dfm.
the solution in this case, is to open up the project in the IDE, remove the TIDSSLIOHandlerSocket, add the TIDSSLIOHandlerSocketOpenSSL and make the necessary connections between components and property settings (values)
0
 

Author Comment

by:LeTay
ID: 20349575
In fact I know that the indy is now 10 and not 9 anymore
The component is in fact not on the form so I only had to change the definitions
The code looks like this  :
var
 POP3:TIdPOP3;
 SSL:TIdSSLIOHandlerSocketOpenSSL;
begin
 POP3 := TIdPOP3.Create(Application);
 SSL    := TIdSSLIOHandlerSocketOpenSSL.Create(Application);
 SSL.ConnectTimeOut := 5000;
 .../...
 POP3.IOHandler   := SSL;
 POP3.Host            := .../...
 .../...
POP3.Connect;  // => Hangs here forever even with the
.../...
 

0
 
LVL 28

Expert Comment

by:2266180
ID: 20349706
get the latest version of the Open SSL dll's, as indy 10 uses those and not those from intellicom (as indy 9)
I think this is a good link: http://gnuwin32.sourceforge.net/packages/openssl.htm (not sure though as I never used ssl with indy 10 yet)

if that doesn't cut it, try a call to
IdSSLOpenSSLHeaders.Load;
before creteing the sslhandler
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:dinilud
ID: 20349836
0
 
LVL 10

Expert Comment

by:dinilud
ID: 20349876
what is the value of POP3.UseTLS ?
0
 

Author Comment

by:LeTay
ID: 20350011
To dinilud
The default value, which is "utNoTLSSupport"
0
 
LVL 10

Accepted Solution

by:
dinilud earned 2000 total points
ID: 20350056
try like this

UseTLS = utUseImplicitTLS
0
 

Author Comment

by:LeTay
ID: 20350282
To ciuly : those found on the link you sent me are older. I tried them but got EidOSSLCouldNotLoadSSLLibrary. So I restored the one I had already which are libeay32.dll and ssleay32.dll. The debug show the call to libeay32.dll followed by a call th ssleay32.dll and followed by a call to rsaenh.dll then it hangs ...
0
 
LVL 10

Expert Comment

by:dinilud
ID: 20350559
i think the problem with UseTLS of POP3.

please check this link

    http://www.indyproject.org/KB/Downloads%5CIndyKB.pdf



What is the difference between implicit TLS and explicit TLS?
0
 

Author Comment

by:LeTay
ID: 20350796
To dinilud : thanks ! This UseTLS settings fixes the problem !
Just one line of code, excellent
I'll give you the points
ps : I will post a second question as now I get an error on SMTP ...
0
 

Author Comment

by:LeTay
ID: 20350893
Finally SMTP is okay as well
Many thanks to all of you
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Integration Management Part 2
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question