public static void ForceChangeIfNeeded(this SmtpClient smtpClient, SmtpServer smtpServer) { if (smtpServer.ForceAuthenticationMethod) { smtpClient.ForceChange(smtpServer.SmtpAuthentication.Value); } }