Я пытаюсь сделать простую форму и отправить форму по электронной почте на определенное письмо.Что происходит, все круто на dev, все круто на локальном продукте, но когда я отправляю его на сервер, он говорит, что он не может выполнить аутентификацию.
Я использую jhipster в качестве генератора проекта и угловогои весна как 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 и все, и ничего не работает.
Если бы кто-нибудь мог мне помочь, я застрял здесь на некоторое время ...