Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy BR REST API Send Email v2 Attachments

in Planning 14 comments

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()

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!