This is not what I meant. I need to specify the source IP address, not the destination.
Say my server has 2 IPs, 100.100.100.1 and 200.200.200.1, and I need my outgoing mail to always originate from 200.200.200.1.
From what I'm seeing, the ClientBase exposes the socket, so I should be able to bind the endpoint before connecting, like:
using (var smtp = new Smtp()) {
smtp.Socket.Bind(myOutgoingEndpoint);
smtp.Connect(targetMX);
...
}
Edit: This works as expected, the outgoing mail comes from the specified endpoint.
Thanks.