I know that this is probably a very simple question, but I've been stuck on it for several hours, the Internet But after a lot of research, it does not detect the problem.
I started a jhipster project, and now I am trying to configure an e-mail server to send e-mail to my new users. So I've edited 2 configuration files in this project:
../ src / test / resources / config / application.yml
../ src / main / resources / Config / application.yml
In each of these I have "Spring: Mail:"
Host: smtp.gmail.com Port: 25 User: Xxx @ gmail. Com Password: xxx Protocol: smtp tls: True author: true: xxx@gmail.com
Then I tried to register a new one and did not work Mail confirmation, I run a test Tried, "MailService" By explicitly calling the function "sendEmail", this also does not work. Anyone know why? Am I making some configuration mistake? Should I do something else?
Adding the information asked about logs:
Generally it is logged when I run a test that calls the sendmail function:
, the email was not sent, but I did not get an error message. After posting a comment, I opened my IDE (Intelligence) again to create a copy of the log to post and found the following log:
[debug] org.portotech.perdigao. Config.AyncConfiguration - Creating Asynchronous Task Exporter & lt; Br> [DEBUG] org.portotech.perdigao.config.MetricsConfiguration - JVM Gauge Register & lt; Br> [DEBUG] org.portotech.perdigao.config.CacheConfiguration - no cache & lt; Br> [Warne] org.portotech.perdigao.Application - No Spring Profile is configured, running with default configuration & lt; Br> [DEBUG] org.portotech.perdigao.config.MailConfiguration- Configuring mail server & lt; Br> [INFO] org.portotech.perdigao.config.Thymeleaf configuration - loading non-reloadable mail message processing & lt; Br> [DEBUG] org.portotech.perdigao.config.DatabaseConfiguration- Configuring Mongues & lt; Br> [DEBUG] org.portotech.perdigao.service.MailService - Send e-mail [multilingual 'false' and 'false'] to 'xxx@gmail.com' with subject 'exam' and content = test and & lt; Br> [Warne] org.portotech.perdigao.service.MailService - The e-mail user could not be sent to 'xxx@gmail.com', the exception is: the mail server connection failed; Nested exception javax.mail.MessagingException: connection error (java.net.NoRouteToHostException: there is no way to host). Failed message: javax.mail.MessagingException: connection error (java.net.NoRouteToHostException: there is no way to host) & lt; Br> [INFO] org.portotech.perdigao.config.Cache Configuration - Remove Cache Manager Matrix & lt; Br> [INFO] org.portotech.perdigao.config.CacheConfiguration - Cache Manager Closing
Then I performed again, and again I did not get that message again about the Nortroostost exposition, The log is like the first deployment of i. This is really strange / / anyway, I did a ping for smtp.gmail.com and it's okay.
You are using port 25 and TLS, and uses TLS port 587.
Comments
Post a Comment