# FxUI.objectApi.fill_email_template(templateId, objectId)
This method allows you to get populated mail templates.
# parameter
parameter | illustrate | type | Optional value | Default value |
---|---|---|---|---|
templateId | Email template id (required) | string | — | — |
objectId | Populate the data of the master object (required) | string | — | — |
# usage
The method returns a Promise Object
, an example of which is as follows:
FxUI.objectApi.fill_email_template('5cef94dfa5083d09dd957955', '5b51b0a0319d19b74dcb46e5').then((data) => {
console.log(data);
// todo what you want
}).catch(err => {
console.log(err);
})
# data structure
{
"subject": "测试测试233", //邮件主题
"template": "" //邮件填充数据后的html
}