| Author |  | 
      
        | mattbrailsford Newbie
 
  
 
 Joined: 12 March 2011
 Location: United Kingdom
 Online Status: Offline
 Posts: 2
 | 
          Hi,
           | Posted: 06 April 2011 at 5:21am | IP Logged |   |  
           | 
 |  
 Can anybody tell me how I would go about extracting the senders IP address from a
 MailMessage?
 
 Many thanks
 
 Matt
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Please check Mime.TimeStamp.From property.
           | Posted: 06 April 2011 at 5:38am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Actually, you'll also need to do some regexp to extract the ip address from there. And some e-mails may have domain name and no ip address there.
           | Posted: 06 April 2011 at 6:52am | IP Logged |   |  
           | 
 |  
 There is no single standard for From in Received headers.
 
 Also, you'll need to iterate through the whole collection of MailMessage.TimeStamps as the message may have multiple senders in the chain.
 
 The originating sender will correspond to the last object in MailMessage.TimeStamps.
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | mattbrailsford Newbie
 
  
 
 Joined: 12 March 2011
 Location: United Kingdom
 Online Status: Offline
 Posts: 2
 | 
          Perfect.
           | Posted: 06 April 2011 at 7:28am | IP Logged |   |  
           | 
 |  
 Many thanks
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Antyradary Newbie
 
  
  
 Joined: 06 May 2011
 Location: United Kingdom
 Online Status: Offline
 Posts: 1
 | 
          I check Mime.TimeStamp.From , for me is ok :)
           | Posted: 06 May 2011 at 12:18pm | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  |