|Subject:||Re: SMTP Server - OnRcptTo and OnMsgReceive|
|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Mon, 26 Sep 2005|
"Master Surfer" <mastersurfer…@web.de> wrote in message
> How can I use the list of receptionists on my server I got
> with the OnRcptTo event in the OnMsgReceive event?
Whenever the OnRcptTo event handler indicates that a recipient is ok, the
recipient is stored in the RCPTList property of the TIdSMTPServerContext
object that is then passed to the OnMsgReceive handler later on. The
RCPTList is of type TIdEMailAddressList, ie:
procedure TForm1.IdSMTPServer1MsgReceive(ASender: TIdSMTPServerContext;
AMsg: TIdStream; var LAction : TIdDataReply);
for I := 0 to ASender.RCPTList.Count-1 do
// send AMsg to ASender.RCPTList[I].Address as needed...
SMTP Server - OnRcptTo and OnMsgReceive posted by Master Surfer on Sun, 25 Sep 2005