安裝與升級 > 安裝與組態指南 > 進階組態 > 配置系統管理設定 > 使用 Oauth 權杖配置電子郵件
使用 Oauth 權杖配置電子郵件
欲在 Windchill 中使用 Oauth 權杖配置電子郵件伺服器,請在 wt.properties 檔案中設定下列內容。
內容
描述
com.ptc.oauth.smtp.clientID
encrypted.com.ptc.oauth.smtp.clientID
郵件伺服器的 Oauth 用戶端 ID。
com.ptc.oauth.smtp.clientSecret
encrypted.com.ptc.oauth.smtp.clientSecret
郵件伺服器的用戶端密碼。
com.ptc.oauth.smtp.enable
True/false
當值設定為 true 時,啟用 OAuth 組態。預設值為 false。
com.ptc.oauth.smtp.scope
用來產生權杖的範圍。例如:https://outlook.office365.com/.defaul
com.ptc.oauth.smtp.tokenURL
用來產生權杖之電子郵件伺服器的權杖 URL。例如:https://login.microsoftonline.com/oauth2/v2.0/token
wt.mail.from
作為電子郵件訊息預設寄件者使用的位址。
wt.mail.mailhost
郵件伺服器的主機名稱。
wt.mail.smtp.starttls.enable
True/false
值設定為 true 時,可讓 TLS 傳送電子郵件。預設值為 false。
wt.mail.verbose
啟用詳細的偵錯記錄。
mail.smtp.port
郵件伺服器使用的埠。
com.ptc.oauth.smtp.custParams
用來擷取權杖的自訂參數。提供指定格式的值。例如,{"test"\:"test1","test2"\:"test3"}
執行以下指令,在 Windchill 金鑰庫中配置及管理 oauth clientID 與用戶端密碼。
ant -f <WT_HOME>/bin/adminTools/sip/EncryptPasswords.xml addValueToKeyStore -DpropertyName=com.ptc.oauth.smtp.clientID -Dpassword=<cliendID>
ant -f <WT_HOME>/bin/adminTools/sip/EncryptPasswords.xml addValueToKeyStore -DpropertyName=com.ptc.oauth.smtp.clientSecret -Dpassword=<secret>
這是否有幫助?