How to mail users according user group using workflow script.

by HP Expert on ‎01-15-2013 02:59 PM

Here is a sample code to mail users from “TDAdmin” group


Dim uCnt, header, body, custUsers, usr, UList

set td = TDConnection

Set custUsers = td.Customization.Users

Set UList = custUsers.Users

header= "Defect ID:" & Bug_Fields("BG_BUG_ID").Value & " - Changed to priority : " & Bug_Fields("BG_PRIORITY").Value

body= "Defect Summary : " & Bug_Fields("BG_SUMMARY").Value

msgbox UList.Count

For Each usr In UList

    uCnt = uCnt + 1

    With usr

        if usr.InGroup("TDAdmin") then

           msgbox "Mailing " & .name & ", " & .Email

           td.SendMail .Email ,"admin","Summary","body",NULL,"HTML"

        end if

    End With


by silviucercel on ‎09-19-2013 05:19 AM

Thank you very much !

by thirugangula on ‎06-05-2014 07:38 AM

Thank you

Follow Us

HP Blog

HP Software Solutions Blog

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation