1

我正在尝试在清单的 UAA_CONFIG_YAML 部分中设置 SMTP 设置。

smtp: 
   host: ${vcap.services.smtpdev.credentials.hostname:localhost} 
   port: 2525 
   user: ${vcap.services.smtpdev.credentials.username:user} 
   password: ${vcap.services.smtpdev.credentials.password:password}

这不起作用,但正在使用 localhost 的默认值。如果我提供无效的占位符,则会引发错误。

4

1 回答 1

0
The way I have done it, I have set the UAA_CONFIG_PATH environment variable which points to the location of the yaml file. 
The settings are provided as follows:
smtp:
  host: smtp.gmail.com
  port: <port_number>
  auth: true
  starttls.enable: false
  user: <username>
  password: <password>

These values are getting picked up by uaa. 
Please let me know if it was helpful.
于 2016-12-09T07:46:53.880 回答