BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

POP3 Server

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Holger Flick
Guest





PostPosted: Sun Mar 20, 2005 1:25 pm    Post subject: POP3 Server Reply with quote



Hi,

I am a little bit unsure about how to use the Indy POP3 server.

I downloaded the example and I understand it. However, I am unsure about
any of the events how to determine for which user to send data. Can I be
sure that the ONRETR-event is triggered by the same user that called the
CheckUser-event before the ONRETR event? Or is there some way to
determine the user from the parameters? The retrieve event looks like this:

(ASender: TIdCommand; AMessageNum: Integer);

I am afraid if more than one user logs into the server that I send
data to the wrong user.

Basically, how do I determine when the RETR is called which user is
asking for a mail?

--
Holger
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Sun Mar 20, 2005 8:21 pm    Post subject: Re: POP3 Server Reply with quote




"Holger Flick" <rammbaer.xyz (AT) xyz (DOT) gmx.de> wrote


Quote:
I downloaded the example and I understand it. However, I am unsure
about any of the events how to determine for which user to send data.

The ASender parameter for the events contains a Thread property. Cast that
property to a TIdPOP3ServerThread, then you can access its Username
property.

Quote:
Can I be sure that the ONRETR-event is triggered by the same user
that called the CheckUser-event before the ONRETR event?

Indy servers are multi-threaded. Multiple clients can be connected at a
time. Each event handler has a parameter to specify which client is
triggering the event.

Quote:
Or is there some way to determine the user from the parameters?

See above.


Gambit



Back to top
Holger Flick
Guest





PostPosted: Sun Mar 20, 2005 8:35 pm    Post subject: Re: POP3 Server Reply with quote



Thanx!

Quote:
The ASender parameter for the events contains a Thread property. Cast that
property to a TIdPOP3ServerThread, then you can access its Username
property.

I looked into the source code for the Server component and found that
out. However, the documentation in the comments in the POP3Server demo
is wrong. This is why I was totally misled at first...

--
Holger

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.