I use indy 10 with delphi 6, i have always the same error (Range Check Error) (only for hotmail)

my code is:

        if IdPOP3.Connected then IdPOP3.Disconnect;
        Connect_ssl := false;
        if StrToInt(_Pop3ServerPort.Items.Strings[ax]) = 995 then
          Connect_ssl := true;

        IdPOP3.ReadTimeout                  := 15000;
        IdPOP3.Host                         := 'Pop3.live.com';
        IdPOP3.Port                         := 110;
        IdPOP3.Username                     := User@hotmail.com;
        IdPOP3.Password                     := Password;
        if Connect_ssl then
          SSLHandler.Destination            := 'Pop3.live.com:995';
          SSLHandler.MaxLineAction          := maException;
          SSLHandler.RecvBufferSize         := 65000;
          SSLHandler.SendBufferSize         := 65000;
          SSLHandler.DefaultPort            := 0;
          SSLHandler.UseNagle               := false;

          SSLHandler.ConnectTimeout         := 15000;
          SSLHandler.SSLOptions.Method      := sslvSSLv2;
          SSLHandler.SSLOptions.Mode        := sslmUnassigned;
          SSLHandler.SSLOptions.VerifyMode  := [];
          SSLHandler.SSLOptions.VerifyDepth := 0;
          IdPOP3.IOHandler                  := SSLHandler;
          IdPOP3.UseTLS                     := utUseImplicitTLS;
          IdPOP3.Host                       := 'Pop3.live.com';
          IdPOP3.Port                       := 995;
          IdPOP3.IOHandler                  := nil;
          IdPOP3.UseTLS                     := utNoTLSSupport;

I have message -> Range Check Error

help me
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

developmentguruConnect With a Mentor PresidentCommented:
I did find a link that covers a problem similar to yours.  According to it the problem is solved by a newer version of Delphi.  If you cna get your hands on a newer version try recompiling your code in it and see if it works.  Here is the link

Hotmail does not use Pop3 it uses HTTP mail.
SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

ProgsXAuthor Commented:
I read that in the assistance in Windows Live

Add your e-mail account to Microsoft Outlook Express
If you have a Windows Live Hotmail Plus subscription, you can use a POP3 (POP3, or Post Office Protocol 3, is a protocol that's used to retrieve e-mail from a mail server.) server to add your Windows Live Hotmail account to Microsoft Outlook Express and access messages there. If you download and install Windows Live Mail, you can add your Windows Live Hotmail account to Windows Live Mail and access your messages and contacts there.

 Use a POP3 server to add your Windows Live Hotmail account to Outlook Express
In Outlook Express, on the Tools menu, click Accounts.
Click Add, and then click Mail.
Type your name, and then click Next.
Type your full Windows Live Hotmail e-mail address, and then click Next.
Enter the following information, and then click Next:
In the My incoming mail server is a box, click POP3.
In the Incoming mail (POP3, IMAP, or HTTP) server box, type pop3.live.com.
In the Outgoing mail (SMTP) server box, type smtp.live.com
Type the account name and the password for your Windows Live Hotmail account. Clear the Remember password check box unless you're the only person with access to the computer. Make sure that the Log on using Secure Password Authentication (SPA) check box isn't selected.
Click Next, and then click Finish.
In the Internet Accounts window, on the Mail tab, click the Windows Live Hotmail account that you added, and then click Properties.
On the Advanced tab, under Server Port Numbers, enter the following information, and then click OK:
In the Incoming server (POP3) box, type 995.
In the Outgoing server (SMTP) box, type 25.
Under both Outgoing mail (SMTP) and Incoming mail (POP3), select the This server requires a secure connection (SSL) check box.
Click Close.
 Use Windows Live Mail as your e-mail program
To download and install Windows Live Mail, see Install and run Windows Live Mail for the first time.

To add a Windows Live Hotmail account to Windows Live Mail, see Add an e-mail, newsgroup, or contacts directory account.

You may be able to receive mail from a POP3 server with other e-mail programs. To determine if your e-mail program allows this, contact the manufacturer of your e-mail program.
Internet Explorer includes Outlook Express. To download the latest version of Outlook Express, go to the Windows Internet Explorer website, and then download the latest version of Internet Explorer.

I assumed that:
  1) You would want to code the email in your own Delphi program
  2) You would want to be able to access all hotmail accounts not just the paid ones.

If you have found something that allows you to use POP3 with hotmail successfully, great.  If not, I would need to know what line your error is occuring on.  Single step through and let me know what line the error happens on.  If you want more from me, let me know.
TheRealLokiConnect With a Mentor Senior DeveloperCommented:
your version of Indy 10 is the problem.
I emailed the author a while back over the same thing.
his recomendation was to upgrade to the latest development snapshot

The actual bug occurs when your pc has been running for "x" number of days.
if you reboot the pc, the range check error goes away for a while...
I am asuming you are having the exact same issue I had.
Upgrading to the laterst dev snapshot solved my problem, and there were no other impacts
ProgsXAuthor Commented:
I did what you my advised, I recompilé, always the same error.

this error is just i connected with hotmail.com or live.com

TheRealLokiSenior DeveloperCommented:
have you tried rebooting? the range check error I had was an indy counter that was overflowing.
ProgsXAuthor Commented:
I have rebouting, I have the same problem with hotmail only

TheRealLokiSenior DeveloperCommented:
ok, I guess it is not the same problem that I had :-( I do not know what it could be
ProgsXAuthor Commented:
Know a person who already done.

to connect itself to hotmail via delphi program with idpop3.

I do not advance

ProgsXAuthor Commented:
with Windows Live E-mail, I can connect and receive the mail

address host: http://mail.services.live.com/DeltaSync_v1.0.0/sync.aspx

then with which component I can connect myself to live.com

I use idPOP and IdSSLIOHandlerSocketOpenSSL

and this IdHTTP component, how I makes
Forced accept.

EE Admin
All Courses

From novice to tech pro — start learning today.