Answers
使用 SmtpClient.ServicePoint.BindIPEndPointDelegate
http://msdn.microsoft.com/en-us/library/system.net.servicepoint.bindipendpointdelegate.aspx
var smtpClient = new SmtpClient(...);
smtpClient.ServicePoint.BindIPEndPointDelegate = (servicePoint, remoteEndPoint, retryCount) =>
new IPEndPoint( IPAddress.Parse( "YOUR LOCAL ADDRESS" ), 0 );
纯洁的腐女
answered 11 years, 9 months ago