电子邮件在本地环境中以产品发送但不在服务器中发送

时间:2019-06-23 19:38:05

标签: angular spring email jhipster

我正在尝试制作一个简单的表单,并将该表单作为电子邮件发送到特定邮件。 发生的事情是,一切对开发人员来说都很酷,对本地产品来说一切都很好,但是当我将其发送到服务器时,它说它无法进行身份验证。

我将jhipster用作项目生成器,并将angle和spring用作FE和BE。

Jun 23 21:28:57 App App.jar[1157]: 2019-06-23 21:28:57.803 WARN 1175 --- 
[app-net-task-2] com.app.net.service.MailService : Email could not be sent to user 
'mail@mail.com': Authentication failed; nested exception is 
javax.mail.AuthenticationFailedException: 535 5.7.3 Authentication unsuccessful 
[VI1PR0401CA0020.eurprd04.prod.outlook.com]

这是我的属性-prod.yml

logging:
  level:
    ROOT: INFO
    com.royal.net: INFO
    io.github.jhipster: INFO

management:
  metrics:
    export:
      prometheus:
        enabled: false

spring:
  devtools:
    restart:
      enabled: false
    livereload:
      enabled: false
  mail:
    host: smtp-mail.outlook.com
    port: 587
    username: email@hotmail.com  #Replace this field with your Gmail username.
    password: password           #Replace this field with your Gmail password.
    protocol: smtp
    tls: true
    properties.mail.smtp:
      auth: true
      starttls.enable: true
      ssl.trust: smtp-mail.outlook.com
  thymeleaf:
    cache: true
server:
  port: 8080
  compression:
    enabled: true
    mime-types: text/html,text/xml,text/plain,text/css, application/javascript, application/json
    min-response-size: 1024


jhipster:
  http:
    cache: # Used by the CachingHttpHeadersFilter
      timeToLiveInDays: 1461
(removed security because you never know)
  mail: # specific JHipster mail property, for standard properties see MailProperties
    from: mail@hotmail.com
  metrics:
    logs: # Reports metrics in the logs
      enabled: false
      report-frequency: 60 # in seconds
  logging:
    use-json-format: false # By default, logs are not in Json format
    logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration
      enabled: false
      host: localhost
      port: 5000
      queue-size: 512

我已经尝试使用gmail电子邮件,但一切都没有。

如果有人可以给我一些帮助,我已经在这里呆了一段时间...

0 个答案:

没有答案