关于javamail-with-ms-exchange-no-authentication-mechansims-supported-by-both-server错误的解决办法
2017-03-10 10:00
330 查看
最近在写邮件相关的程序的时候碰到一个错误,javamail-with-ms-exchange-no-authentication-mechansims-supported-by-both-server 字面上的意思,身份验证有问题。于是开始google
If you're trying to connect to your mail server without authentication,
call the connect method thatdoesn't take
a username and password. If you pass it a username and password, it thinks you reallywant
to authenticate, and since it can't find an authentication mechanism that the server supports, it fails ------bill shannon
--意思就是:如果你想要在不使用身份验证情况下连接邮件服务器,那么你调用的方法不应该带有用户名和密码。如果你使用了用户名密码,服务器会当你是想正式登录邮箱,邮件服务器无法找到对应的身份验证机制时,就会产生该错误。
问题出现原因:配置了身份校验,而这个邮件服务器是内网中的邮件服务器,无需身份校验即可发送邮件。邮件服务器也没有提供相应的身份验证方法。因此报错。
解决办法:去除SMTP协议中的身份校验 mail.smtp.auth 设定为false ,并将密码设定为空。邮件发送成功~
If you're trying to connect to your mail server without authentication,
call the connect method thatdoesn't take
a username and password. If you pass it a username and password, it thinks you reallywant
to authenticate, and since it can't find an authentication mechanism that the server supports, it fails ------bill shannon
--意思就是:如果你想要在不使用身份验证情况下连接邮件服务器,那么你调用的方法不应该带有用户名和密码。如果你使用了用户名密码,服务器会当你是想正式登录邮箱,邮件服务器无法找到对应的身份验证机制时,就会产生该错误。
问题出现原因:配置了身份校验,而这个邮件服务器是内网中的邮件服务器,无需身份校验即可发送邮件。邮件服务器也没有提供相应的身份验证方法。因此报错。
解决办法:去除SMTP协议中的身份校验 mail.smtp.auth 设定为false ,并将密码设定为空。邮件发送成功~
相关文章推荐
- 关于在java中连接MS SQL Server 2005 JDBC的问题及解决办法
- 关于在java中连接MS SQL Server 2005 JDBC的问题及解决办法
- how to setup DatabaseMail(with MS Exchange Server)
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 关于Microsoft SQL Server 2005 错误 233 的解决办法
- 转帖:MS SQL Server 2000 数据库使用备份还原造成的孤立用户和对象名‘xxx’无效的错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- [SQL2005]安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- 安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法
- (转)安装Ms SQL Server 2005 开发版时出现性能计数器要求安装错误的解决办法