I had configure smpt mail for my site and it’s work when I tried to send one single email but I have following error when I want to send it to more people, In addition I use SendAsyn method.
When I Send all Emails using LOOP
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)
When I Add All Emails to BCC
Service not available, closing transmission channel.
The server response was: Too many bad commands, closing transmission channel
at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result)
at System.Net.Mail.SmtpTransport.EndSendMail(IAsyncResult result)
at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result
what is the solution for that ?
I have a similar situation whereby l am sending multiple emails and not waiting for one to finish before sending another.
What l did was initiate a new SMTPClient for every mail to be sent and send asynchronously. Like this:
The error was caught in the SendCompletedEvent Handler.
Of course the error appeared for only one email while the other 7 went thru to different mail boxes both before and after it in the same run. What caused the error, l still don’t know.
When l ran my program again, it picked up the mail that was not sent and sent it off successfully.
Hope this helps others cos l realise that the question was posted more than 15 months ago.