2016-11-11 84 views
1

我試圖設置清單的UAA_CONFIG_YAML部分中的SMTP設置。UAA_CONFIG_YAML環境變量中的佔位符

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的默認值正在拾取。如果我提供了一個無效的佔位符,則會引發錯誤。

回答

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. 
+0

是的,但隨後憑證出現在源代碼中。它應該能夠從環境中的服務綁定中獲得憑據,但顯然不是。 – miclip