 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Holger Flick Guest
|
Posted: Sun Mar 20, 2005 1:25 pm Post subject: POP3 Server |
|
|
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
|
Posted: Sun Mar 20, 2005 8:21 pm Post subject: Re: POP3 Server |
|
|
"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
|
Posted: Sun Mar 20, 2005 8:35 pm Post subject: Re: POP3 Server |
|
|
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 |
|
 |
|
|
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
|
|