If MailKit
SmtpClient
is used on a system with more than one public IP address
, is there a way of telling it what IP address
to use or limit it to using a certain NIC
?
Asked
Active
Viewed 404 times
2
-
Usually you try all IP until you make a connection. The way if a connection already exists and fails you try the next until you find a valid connection. – jdweng May 14 '18 at 06:59
-
2Set `SmtpClient.LocalEndPoint` property to the desired local ip address. – Evk May 14 '18 at 07:34
-
@Evk: Sooo obvious. Wonder why I didn't see it. Thank you for pointing it out for me. – kamiwa May 14 '18 at 14:28
-
@Evk, please add as an answer – Hüseyin Sekmenoğlu Sep 03 '19 at 11:06