Groovy Send Mail

Anonymous
groovy
12/26/2021 12:40 AM
588 B
27
Indexable
Map<String,String> emailParams = [:]
emailParams.put("to", "[email protected]")
emailParams.put("subject", "Sending mail from a business rule using groovy" )
emailParams.put("body", "This is the body of the groovy mail..." )

HttpResponse<String> jsonResponse = operation.application.getConnection("Mail")
.post("/sendmail")
.header("Content-Type","application/x-www-form-urlencoded")
.queryParams(emailParams)
.asString()
Editor is loading...