Welcome, Guest
Username: Password: Remember me
Components and Libraries for Networking Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Indy POP3 12 years 3 months ago #2296

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Hi there!
Indy IdPOP3 and ? :S
What components are necessary to connect and count messages?
e.g.
procedure TForm1.Button1Click(Sender: TObject);
var
msgs : Integer;
begin
IdPOP3_1.Host:= 'pop.googlemail.com';
IdPOP3_1.Port:= 995;
IdPOP3_1.Username:= 'This email address is being protected from spambots. You need JavaScript enabled to view it.';
IdPOP3_1.Password:= 'password';
try
IdPOP3_1.Connect;
msgs:= IdPOP3_1.CheckMessages;
ShowMessage(Format('Msg: %d', [msgs]));
IdPOP3_1.Disconnect;
except
on E : Exception do
begin
ShowMessage(E.Message);
Exit;
end;
end;
end;
Thanks!

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2299

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Some useful link, please?
Thanks!

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2300

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Please Sir
Try this INDY SVN revision 4774 (21-7-2012)
PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Indy POP3 12 years 3 months ago #2301

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Thank you very much, sternas! I will try.
Regards!

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2302

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
I've got error.
_________________________________
procedure TForm1.Button1Click(Sender: TObject);
begin
IdPOP3_1.Host:= 'pop.googlemail.com';
IdPOP3_1.Username:= 'some_user';
IdPOP3_1.Password:= 'pwd';
IdPOP3_1.Port:= 995;
try
IdPOP3_1.Connect;
Application.ProcessMessages;
except
on E : Exception do
begin
ShowMessage(E.Message);
Exit;
end;
end;
ShowMessage('Success');

end;

procedure TForm1.IdPOP3_1Connected(Sender: TObject);
var
msgs : Integer;
begin
ShowMessage('I am here');//works
Application.ProcessMessages;
msgs:= IdPOP3_1.CheckMessages;//doesn't work or something else
Application.ProcessMessages;
ShowMessage(Format('Msgs: %d', [msgs]));
end;
___________________________________________________
--Comment (IdIOHandler unit)
{--
If this is a CLIENT
The server side of this connection has disconnected normaly but your client has attempted
to read or write to the connection. You should trap this error using a try..except.
Please see the help file for possible further information.

// ************************************************************* *)
raise EIdConnClosedGracefully.Create(RSConnectionClosedGracefully);
----}
Anyway, thank you!
Attachments:

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2318

  • acoliveira
  • acoliveira's Avatar
  • Visitor
  • Visitor
here a sample,but using synapse, www.ararat.cz/synapse/doku.php/public:howto:pop3sample, see:
synapse.ararat.cz/doc/help/ (Class TPop3Send property statcount)

best regards!

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2319

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Thank you very much, acoliveira!
Just today I tried to work with synapse
and I was impressed! Works excellent, pop and smtp.
Regards!
p.s. XUbuntu 12.4 32bit, CT2.7

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2324

  • acoliveira
  • acoliveira's Avatar
  • Visitor
  • Visitor
great, see (www.lazarus.freepascal.org/index.php?topic=10902.0) LazSolution !, same author websolution, are a lot of sample in this package (github.com/silvioprog/lazsolutions)

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 3 months ago #2330

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Wow, so many interesting things. Thank you very much.
It will take me a little more time to study all the options... :woohoo:
Best regards!
p.s. Now deal with the separation of parts received messages, MIME types, etc..

Please Log in or Create an account to join the conversation.

Indy POP3 12 years 2 months ago #2461

  • ExDatis
  • ExDatis's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
I got great instructions(Indy), and example, Lazarus forum:
www.lazarus.freepascal.org/index.php/topic,17626.0.html
Many thanks, teonieuwlande, JD and theo!
Regards.
p.s. At the end of first page, you have example. :whistle:

Please Log in or Create an account to join the conversation.

Last edit: by ExDatis.
  • Page:
  • 1