1. Here’s a simple, famous 3-line code snippet to send an email. This example uses a communication template, but the body (MESSAGE) can be dynamically modified as needed
ctMboSet = mbo.getMboSet("$commtemp","COMMTEMPLATE"," TEMPLATEID ='COE_SCHEDULED' ");
ctMboSet.setQbeExactMatch("true")
ctMboSet.reset()
ctMbo = ctMboSet.getMbo(0)
ctMbo.setValue("MESSAGE", txtres)
if(ctMbo is not None):
ctMbo.sendMessage(mbo,mbo);