I am trying to send mail to test designer from test set when a status is changed. I could able to send groups like admin, but not to test designer.
Dim rs, rst
On Error Resume Next
If TestSetTest_Fields("TC_STATUS").IsModified Then
If TestSetTest_Fields.Field("TC_STATUS").Value = "Ready to start" Then
Set rs = TDConnection.TestSetFactory
Set rst = rs.Item(TestSetTest_Fields.Field("TC_CYCLE_ID").Value)
Set TS = TDConnection.TestFactory
' Send email notification
Dim responsibleUser
responsibleUser = TS.Test_Fields("TS_RESPONSIBLE").Value
If responsibleUser <> "" Then
rst.Mail responsibleUser, "", 0, "The Test Case " & rst.Name & " Status Changed to __Ready to Start__"
Else
' Handle case where there is no responsible user
rst.Mail "[TDAdmin]", "", 0, "The Test Case " & rst.Name & " Status Changed to __Ready to Start__ but no responsible user was found."
End If
' Cleanup
Set rst = Nothing
Set rs = Nothing
End If
End If
On Error GoTo 0 ' Reset error handling