Archive for the ‘SMTP’ Category
Service not available, closing transmission channel. The server response was: 4.3.2 Service not available, closing transmission channel
Try setting the following properties.
smtpClient.UseDefaultCredentials = true;
You can also pass credentials if the program will run under a local user. This can be done like this:
smtpClient.Credentials = GetMailCredentials();
private static System.Net.NetworkCredential GetMailCredentials()
{
System.Net.NetworkCredential cred = new System.Net.NetworkCredential();
cred.UserName = ConfigurationSettings.AppSettings["User"];
cred.Password = ConfigurationSettings.AppSettings["Pwd"];
cred.Domain = ConfigurationSettings.AppSettings["Dom"];
return cred;
}
Reading this makes it seem very logic, secure server disables anonymous login.