Sep 02
It is very easy to connect and speak to a mail server especially in POP3 with a SSL layer protection.
What do you need ?
- Indy components
- Indy Open SSL library (libeay32.dll and ssleay32.dll). You can download these files here
procedure connection;
var
POP3Client :TIdPOP3;
begin
POP3Client := TIdPOP3.Create(nil);
con_SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create();
try
POP3Client.IOHandler := con_SSLHandler;
POP3Client.UseTLS := utUseImplicitTLS; { Here you could add 3 things (normally it is utUseImplicitTLS ) : utNoTLSSupport, utUseImplicitTLS, // ssl iohandler req, allways tls
utUseRequireTLS, // ssl iohandler req, user command only accepted when in tls utUseExplicitTLS // < user can choose to use tls }
with POP3Client do begin
// Dont login automatically
AutoLogin := false;
ConnectTimeout := // Millisecond for Timeout ;
// Min Variables
Username := // The Username of your Mail Account;
Password := // The Password of this Mail Account;
Host := // The Host (server IP or adress);
Port := // Port to access the Server;
// Login, raise an exception if there is a problem
login;
end;
finally
POP3Client.free;
SSLHandler.free;
end;
end;
In the next post we will see how to connect POP3 account with SASL protocol etc...
Jul 30
I will explain you how to connect your Mail Server with TIDPOP3.
You will need :
- Indy Source, last snapshots download Here
- SSL Dlls associated to Indy projects (downloadable on Indy’s FTP)
- Delphi
Simple connection with TIDPop3Client
procedure Connection;
var
POP3Client: TIDpop3;
begin
POP3Client := TIdPOP3.Create(nil);
try
with POP3Client do begin
// Dont login automatically
AutoLogin := false;
ConnectTimeout := // Millisecond for Timeout ;
// Min Variables
Username := // The Username of your Mail Account;
Password := // The Password of this Mail Account;
Host := // The Host (server IP or adress);
Port := // Port to access the Server;
// Login, raise an exception if there is a problem
login;
end;
finally
POP3Client.free;
end;
end;
In the next post we will see how to connect POP3 account with SSL security.
Tagged with: Delphi • Indy • Internet • login • Mails • Pascal Object • POP3Client • TIdPOP3
Jul 30
It is very easy to add an anonymous method in threads synchronization :
procedure Thread_POP3.Execute;
// Variables
begin
synchronize
(procedure
begin
// Instructions here
end);
end;
Rémi
Tagged with: Delphi 2009 • Multithreading • synchronization • synchronize • Threading
Jun 03
I actually apologize about my very bad English handle. Please forgive the Frenchy speaking as a milky cow !

Jun 03
This blog gives informations for professionnal and especially developers who need to optimize and improve the software I-Mail. There will be also other things, like tips and tricks for developers. The main part of those tips and tools will be dedicated for Delphi IDE and Visual C# .NET.

Logo OnKeySoft