SMTP error: “Client does not have permission to submit mail to this server”

倾然丶 夕夏残阳落幕 提交于 2019-12-04 03:37:09

问题


I'm getting the following error while sending email. What could be the cause?

Client does not have permission to submit mail to this server. The server response was: 5.5.1 STARTTLS may not be repeated.

Here's the stack trace...

Stack Trace

at System.Net.Mail.StartTlsCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.StartTlsCommand.Send(SmtpConnection conn)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)

I'm connecting to smtp.gmail.com with SSL on port 587 / 465


回答1:


It appears you are using an SSL/TLS connection to send the mail message, however it appears for some reason that the code is sending the request to open the connection twice which is not valid. Hard to tell just from the exception and stack what the problem is. Post the sending code if possible.




回答2:


Perhaps the SMTP server requires authentication (username / password) and you don't supply them? (Just a guess)



来源:https://stackoverflow.com/questions/2800514/smtp-error-client-does-not-have-permission-to-submit-mail-to-this-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!