zoukankan      html  css  js  c++  java
  • 19.springboot邮件服务服务器部署访问不到邮箱服务器解决方案

    1.前言

    在Springboot项目的生产环境中,win系统环境下,邮箱服务是可以正常使用的。

    当项目部署到阿里云服务器上之后,因为服务器端口采用安全组的方式,25端口访问不到。

    在网上查找了一部分资料之后,成功找到了解决方案。

    2.解决方案

    代码什么的都不需要动,只需要添加邮箱SSL配置和端口配置就可以了。

    #配置邮箱协议
    spring.mail.default-encoding=utf-8
    spring.mail.username=xxxxxxxx@163.com
    spring.mail.host=smtp.163.com
    spring.mail.properties.mail.smtp.auth=true
    spring.mail.properties.mail.smtp.socketFactory.port=465
    spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
    spring.mail.password=xxxxxxxxxxxxx
    
  • 相关阅读:
    ORACLE(系统表emp) 基本与深入学习
    jQuery框架 的四个入口函数
    函数
    sql1999语法
    左连接,右连接
    Oracle单行函数用法
    Kettle
    order by 排序
    sql*plus
    sql基本语句
  • 原文地址:https://www.cnblogs.com/TimerHotel/p/springboot19.html
Copyright © 2011-2022 走看看