The server response was: 4.3.2 Service not available, closing transmission channel
Asked Answered
B

3

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 = "[email protected]";
MailMessage msg = new MailMessage();
msg.From = new MailAddress(adminID);
msg.To.Add("[email protected]");
msg.Subject = "Sample Email";
msg.Body = "Hello ";
SmtpClient SmtpMail = new SmtpClient();
SmtpMail.Host = "basic.smtp.ttu.edu";
SmtpMail.Port = 25;
SmtpMail.Send(msg);
Boccherini answered 4/10, 2012 at 17:48 Comment(0)
B
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!

Boccherini answered 12/10, 2012 at 16:6 Comment(2)
1. I've never had any permissions issues using system.net.mail. 2. How would one get rights while testing on a dev box?Keyte
You might need to add your IP address to the firewall for the exchange server.Goulette
C
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.

Cline answered 6/1, 2021 at 15:23 Comment(0)
S
0

use SmtpMail.Dispose(); after every loop so new connection will be requested by the client.

Sadirah answered 2/1 at 13:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.