0
I am getting the following error while running the system on the server with port 587: Mailbox not available
Error stack:
When I change the door to 465 and Smtpserver.Enablessl = true; timeout occurs;
I run the same system on my local machine and it works normally with port 587.
Source code used:
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("host");
mail.From = new MailAddress("email");
mail.To.Add("to");
mail.Subject = "teste"
mail.Body = "teste";
SmtpServer.Port = 587;
SmtpServer.Credentials = new
System.Net.NetworkCredential("login", "senha");
SmtpServer.EnableSsl = false;
SmtpServer.Send(mail);
can be a firewall problem, but by the mansage part that can be read, it seems that you are not authenticating with the same email account that you are using to send the message.
– Leandro Angelo
I tested with firewall disabled and error persisted.
– Caio Hyppolito