The sendmail function shows: Syntax error, command unrecognized. Server response:

When sending mail with a specific identifier, I get this error, since the rest of the id is working fine, what was the problem here.

Syntax error, command unrecognized. The server response was: 
status code :0 

stack trace:

   at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result)
   at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result)

Short:

 System.Net.Mail.SmtpException: Syntax error, command unrecognized. The server response was: 
   at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result)
   at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result)

Please help me.

+3
source share
1 answer

This error message says "Unrecognized command"

This means that β€œsomething” was not formatted correctly.

The stack trace shows where the error occurred.

Last step: ConnectAndHandshakeAsyncResult

This happens at the server level.

The message sent to the mail server is corrupted.

+2
source

Source: https://habr.com/ru/post/1740442/


All Articles