Got bad greeting from SMTP host: smtp.163.com, port: 465, response: [EOF]
在Spring Boot项目中,使用org.springframework.mail.javamail.JavaMailSender发送邮件抛异常,异常信息:
Mail server connection failed; nested exception is javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.163.com, port: 465,
response: [EOF]. Failed messages: javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.163.com, port: 465, response: [EOF]
问题分析:设置邮件协议的时候,配置如下:
spring.mail.protocol=smtp
#设置ssl端口
spring.mail.port=465
注意,是smtp,结尾没有字母s。另外,在不设置该属性的时候,系统默认使用SMTP协议。
解决方案:修改配置文件,使用邮件传输协议SMTPS,使得传输协议与端口465相匹配:
spring.mail.protocol=smtps
结论:重启服务,经验证问题搞定。其实,网上很多人写的博客都把配置信息写错了,我就是抄错了,这里记下来,亡羊补牢。
Got bad greeting from SMTP host: smtp.163.com, port: 465, response: [EOF]的更多相关文章
- Could not connect to SMTP host: smtp.***.com, port: 465, response: -1
背景 在使用javamail进行邮件发送的时候,报错: Could not connect to SMTP host: smtp.***.com, port: 465, response: -1 原因 ...
- javax.mail.MessagingException: Could not connect to SMTP host: smtp.xdf.cn
1.问题描述:关于使用Java Mail进行邮件发送,抛出Could not connect to SMTP host: xx@xxx.com, port: 25的异常可能: 当我们使用Java Ma ...
- javaMail的使用以及trying to connect to host "1xxx@163.com", port 25, isSSL false异常
最近项目用到邮件系统,开始了解javaMail...话不多说先上代码: pom依赖: <!-- 邮件 https://mvnrepository.com/artifact/javax.m ...
- Could not connect to SMTP host: smtp.qq.com, port: 465, response: -1 SpringBoot发送邮件
解决方案 换端口 QQ邮箱可以把端口换成587 设置属性 spring.mail.properties.mail.smtp.ssl.enable=true 原因 465端口是为SMTPS(SMTP-o ...
- 【Linux】【Jenkins】邮件发送失败的问题javax.mail.MessagingException: Could not connect to SMTP host:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.126.com,port:25 解决方案: 之前用的是126邮箱 ...
- 使用SpringBoot + JavaMailSender 发送邮件报错 Mail server connection failed;Could not connect to SMTP host
说明: 出于安全考虑,阿里云默认封禁 TCP 25 端口出方向的访问流量,无法在阿里云上的云服务器通过 TCP 25 端口连接外部地址. [官方提示]:如果您需要使用阿里云上的云服务器对外部发送邮件, ...
- 用phpmailer发送邮件提示SMTP Error: Could not connect to SMTP host解决办法
之前做项目的时候做了一个用phpmailer发送邮件的功能<CI框架结合PHPmailer发送邮件>,昨天步署上线(刚开始用新浪云,嫌贵,换成阿里了),测试的时候,发送邮件却意外报错了.. ...
- 服务器发送邮件出现Could not connect to SMTP host错误 解决办法
服务器发送邮件出现Could not connect to SMTP host错误 解决办法 功夫不负有心人,最后了解到,除了google的smtp服务器收到请求“smtp”会接受,其他服务器比如qq ...
- Could not connect to SMTP host: localhost, port: 25;
1.错误描写叙述 DEBUG: setDebug: JavaMail version 1.3.3 DEBUG: getProvider() returning javax.mail.Provider[ ...
- 阿里云服务器发送邮件:Connection could not be established with host smtp.qq.com [Connection timed out #110]
阿里云服务器发送邮件:Connection could not be established with host smtp.qq.com [Connection timed out #110] 一.总 ...
随机推荐
- redmine 迁移后邮箱配置
https://blog.csdn.net/love8753/article/details/126380927 步骤一 修改配置文件 步骤二 redmine 页面配置信息 步骤一 修改配置文件 打开 ...
- 视频笔记软件JumpVideo技术解析一:Electron案例-调用VLC播放器
大家好,我是TheGodOfKing,是 最强考研学习神器,免费视频笔记应用JumpVideo,可以快速添加截图时间戳,支持所有笔记软件,学习效率MAX!的开发者之一,分享技术的目的是想找到更多志同道 ...
- PV、UV、VV、IP含义及计算方式
什么是PV? PV 即 Page View,网站浏览量,指页面浏览的次数,用以衡量网站用户访问的网页数量. 用户每次打开一个页面便记录1次PV,多次打开同一页面则浏览量累计.一般来说,PV与来访者的数 ...
- docker部署ceph集群
1. 创建Ceph专用网络 sudo docker network create --driver bridge --subnet 172.20.0.0/16 ceph-network 2. 拉取搭建 ...
- go context 子Goroutine超时控制
context使用 Go语言第一形参通常都为context.Context类型,1. 传递上下文 2. 控制子Goroutine超时退出 3. 控制子Goroutine定时退出 package mai ...
- vim中文乱码 vim字符集设置
vim中文乱码 vim字符集设置 vim的设置一般放在/etc/vimrc文件中,不过,建议不要修改它.可以修改~/.vimrc文件(默认不存在,可以自己新建一个),写入所希望的设置. set fil ...
- Linux系统查看CPU使用率、内存使用率、磁盘使用率
一.查看CPU使用率1. top 命令[root@sss ~]# toptop - 16:54:38 up 7 days, 5:13, 3 users, load average: 0.00, ...
- AIops
How does AIOps work?With AIOps, your organization takes a more proactive approach to resolve IT oper ...
- 推荐Linux命令行运维工具: Wowkey--实现自动化批量化标准化
WowKey命令行运维工具,Linux设备的自动化.批量化.标准化的运维解决方案,解放运维人,提升企业运维效率和质量. 有人能理解做设备的运营维护工作的痛苦所在吗? 如果你的运维工作中,只维护个位数数 ...
- 基于transformer的机器翻译:手把手教你实现
目录 前言 transformer模型的搭建 Input embedding Encoder Decoder output transformer构建 data数据集处理 train config 参 ...