SMTP客户端未通过身份验证等多种错误解决方案分享

2019-12-30 12:27:02王旭

解决方法 :方法一 设置成“client.EnableSsl = false ”或去掉这句代码
                        方法二 开启安全连接服务

错误三:SMTP 服务器要求安全连接或客户端未通过身份验证。 服务器响应为: Authentication required  
堆栈跟踪:   [SmtpException: SMTP 服务器要求安全连接或客户端未通过身份验证。 服务器响应为: Authentication required]

解决方法:
client.EnableSsl = false; 改为 client.EnableSsl = true;  但是这样该后可能会出现“错误二”的提示,所以要解决
这个的话 首先保证服务器是支持安全连接的

错误四:
SMTP 服务器要求安全连接或客户端未通过身份验证。 服务器响应为: 5.7.0 Must issue a STARTTLS command first. 9sm5225813ywf.35

解决方法:sina要求用ssl连接 可以改一下true   

万能解决方法:
1、POP3和SMTP服务器要填正确
2、服务器的端口要正确
3、我的服务器要求身份认证
4、发送邮件的用户名和密码要正确

//设置邮箱smtp服务器 端口
SmtpClient client = new SmtpClient("smtp.sina.com",587); 就可以了 
163的最固执了!需要注意点 QQ最好过!呵呵

有些时候邮件被退信的原因  提供以下解决方法:

一、FOXMAIL发送邮件常见出错代码:   

问题:the server says:550 relaying mail to <> is not allowed   
问题:The server says:550 <>... relaying denied   
问题:the server says:550 5.7.1 relaying not permitted: 
解答:使用某些Smtp服务器时,限制了收件人的地址,只能换一个Smtp服务器。  

问题:The server says:550 <>:local user only   
问题:The server says:550 <>:Invalid User   
问题:The server says:550 Invalid recipient   
解答:使用163.net,163.com,yeah.net和netease.com之类的Smtp服务器时,只能用自身的信箱发信,所以要在Outlook Express的“帐户属性”中的“个人信息”里面填写正确的邮件地址。  

问题:the server says:551 delivery not allowed to non-local recipient