Q:

Smtp Received from IP addresses not matching

I am sending emails via SMTP, in C#, to Google Mail and although it is working, there is an issue:

Received: from 11.111.11.103 (mx101.company.com. [11.111.11.101])
          by mx.google.com with ESMTP id fw15si12217298wbb.73.2011.12.06.06.44.24;
          Tue, 06 Dec 2011 06:44:25 -0800 (PST)

I have multiple IP addresses that I send from, and I have configured my HelloDomain to be the first IP address (x.x.x.103) which can be seen working above (also it's name is mx103.company.com).  I was expecting to see the output below:

Received: from 11.111.11.103 (mx103.company.com. [11.111.11.103])
          by mx.google.com with ESMTP id fw15si12217298wbb.73.2011.12.06.06.44.24;
          Tue, 06 Dec 2011 06:44:25 -0800 (PST)

Any ideas on why this is happening?

A:

Ok, so the answer is configuring your LocalEndPoint.  I have been banging my head against the keyboard all day and finally realised that I wasn't assigning the LocalEndPoint, which in turn defaulted to the first IP address.

