Quality Center / ALM Knowledge Base
Showing results for 
Search instead for 
Do you mean 

How to mail users according user group using workflow script.

by 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


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

Thank you very much !

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

Thank you

vdiaz on ‎05-14-2015 06:35 AM

This is very close to what I need.

Instead, I would like to email a defect report to members of a group when the priority is changed to -"High" or something similar...