9

I am getting this error while sending email from my application. Can anyone suggest any solution.

Service not available, closing transmission channel. The server response was: 4.3.2 Service not available, closing transmission channel

Below is code.

string adminID = "AAA@tu.edu";
MailMessage msg = new MailMessage();
msg.From = new MailAddress(adminID);
msg.To.Add("BBB@ttu.edu");
msg.Subject = "Sample Email";
msg.Body = "Hello ";
SmtpClient SmtpMail = new SmtpClient();
SmtpMail.Host = "basic.smtp.ttu.edu";
SmtpMail.Port = 25;
SmtpMail.Send(msg);
Alfabravo
  • 7,493
  • 6
  • 46
  • 82
techblog
  • 529
  • 2
  • 5
  • 16

2 Answers2

21

Got the solution for the issue. The Server was rejecting the request because this application didn't have write rights on that server. The code was perfectly fine, just it was permissions problem. Hope this helps someone!

techblog
  • 529
  • 2
  • 5
  • 16
2

Please check whether the server which is sending the e-mail is whitelisted on the SMTP server or Exchange server.

I had the same issue and whitelisting it on SMTP server resolved my issue.