support email content-type

This commit is contained in:
liugq 2023-08-04 22:06:02 +08:00
parent a44f93a14c
commit ceb5d39b0d
2 changed files with 2 additions and 0 deletions

View File

@ -20,4 +20,5 @@ type Email struct {
} `json:"recipients" elastic_mapping:"recipients:{type:object}"`
Subject string `json:"subject" elastic_mapping:"subject:{type:text}"`
Body string `json:"body" elastic_mapping:"body:{type:text}"`
ContentType string `json:"content_type" elastic_mapping:"content_type:{type:keyword}"`
}

View File

@ -27,6 +27,7 @@ func (act *EmailAction) Execute()([]byte, error){
"variables": util.MapStr{
"subject": act.Subject,
"body": act.Body,
"content_type": act.Data.ContentType,
},
}
emailMsgBytes := util.MustToJSONBytes(emailMsg)