msg.setContent does not send messages if the GString type GString passed as content.
Remember to convert GString to java.lang.String
Use toString()
def gStringContent = "Hellow ${name}" logger.println 'Content type is ' + gStringContent.getClass() msg.setContent(gStringContent.toString(), 'text/html')
Use explicit String input
String gStringContent = """Hello $name Goodby ${name}""" logger.println 'Content type is ' + gStringContent.getClass() msg.setContent(gStringContent.toString(), 'text/html')
and etc.
That was my problem. Fixed.
source share