Groovy BR REST API Send Email v2 Attachments
Summary:
Groovy business rule to send email using v2 is working except attachments.
Content (required):
Cannot seem to get the parameters syntax correct.
Version (include the version you are using, if applicable):
PBCS
Code Snippet (add any code snippets that support your topic, if applicable):
if (emailAttachments.size() > 0) { queryParam.put('attachments',emailAttachments.join(',')) } ; println queryParam
HttpResponse<String> jsonResponse = connection.post(urlSendmail)
.header('Content-Type','application/json')
.body(json(body))
.queryParam('parameters',json(queryParam))
.asString()
Tagged:
0