I written the macro which has been written has been setup to be executed "OnPostReload" trigger.I have tested it and works fine but the problem is even if script fails it sends an email which we don’t want. script is as bellow.
function SendMessage()
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "QlikView test message"
objMessage.From = """ABC D"" <sd@ABC.com>" ' Dummy ID