0

I'm new to Jhispter and I created an application using the yeoman generator for Jhipster.

When I logged as an admin to this application to check the Health checks section I noticed that email service is down and the details says this :

com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1

How can I solve this problem ?

Renaud is Not Bill Gates
  • 1,684
  • 34
  • 105
  • 191

2 Answers2

2

You must fill properties in application-dev.yml or application-prod.yml with your real account data (eg gmail account)

    mail:
    host: localhost
    port: 25
    username:
    password:

Sample file: https://github.com/jhipster/jhipster-sample-app-token/blob/master/src/main/resources/config/application-dev.yml

kkhipis
  • 159
  • 7
0

Go to application-prod.yml and add config below to fix it.

spring:
mail: 
    host: smtp.gmail.com
    port: 587
    user: your gmail address
    password: your password
    protocol: smtp
    tls: true
    auth: true
    from: spoonatte@gmail.com
    properties.mail.smtp:
        auth: true
        starttls.enable: true
        ssl.trust: smtp.gmail.com

OR in application-prod.yml

    mail:
    host: smtp.gmail.com
    port: 587
    username: your gmail address       
    password: your password           
    protocol: smtp
    tls: true
    properties.mail.smtp:
        auth: true
        starttls.enable: true
        ssl.trust: smtp.gmail.com
   messages:
    cache-seconds: 1
  thymeleaf:
    cache: false
user1067665
  • 495
  • 9
  • 32