Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

email

asp.net

While sending mail from particular id I get this error, for rest of all id's its working fine, What was the problem over 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)

Brief:

 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 out..

like image 336
Innova Avatar asked Aug 26 '26 09:08

Innova


1 Answers

This error message states "Command unrecognized"

This means "something" was not formatted correctly.

The stack trace shows where the error occurred.

The final step was ConnectAndHandshakeAsyncResult

This is happening at the server level.

The message passed to the mail server is messed up.

like image 157
Dan But Avatar answered Aug 28 '26 00:08

Dan But



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!