[英]SMTP error: “Client does not have permission to submit mail to this server”
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.
服务器响应为:5.5.1 STARTTLS可能不会重复。
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 我正在使用端口587/465上的SSL连接到smtp.gmail.com
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. 似乎您正在使用SSL / TLS连接发送邮件,但是由于某种原因,该代码似乎发送了两次打开连接的请求,这是无效的。 Hard to tell just from the exception and stack what the problem is.
仅从异常和堆栈中很难找出问题所在。 Post the sending code if possible.
如果可能,发布发送代码。
Perhaps the SMTP server requires authentication (username / password) and you don't supply them? 也许SMTP服务器需要身份验证(用户名/密码),而您不提供身份验证? (Just a guess)
(只是一个猜测)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.