Re: How to see the IP ?

Giganews Newsgroups
Subject: Re: How to see the IP ?
Posted by:  nd (no@spam.com)
Date: Thu, 28 Apr 2005

> When the  IdSMTPServer receives a message, how to discover origin IP of
> the
> message ?

Use the ASender parameter in the "OnMailFrom" event:

procedure xxx.SMTPServerMailFrom(ASender: TIdSMTPServerContext; const
AAddress: String; var VAction: TIdMailFromReply);
begin
    RememberMyConnectedIP:=aSender.Connection.Socket.Binding.PeerIP;
end;

Replies

In response to

How to see the IP ? posted by ARP on Thu, 28 Apr 2005