I have a script that sends email to a group of users. The NYRMTTGrpEmail is an array. I want to be able to add a Copy to. I’ve tried different methods but i’m not able to make it work. any assistance will be appreciated. The email only goes to the people under NYRMTGrpEmail.
RecipField = curdoc.GetItemValue(“NYRMTGrpEmail”)
Forall n In RecipField
Set Names = New NotesName(n)
If MDoc.HasItem(“Recipients”) Then
Call MDoc.GetFirstItem(“Recipients”).AppendToTextlist(Names.Addr821)
Else
MDoc.Recipients1 = Names.Addr821
End If
End Forall
MDoc.SendTo=RecipField
MDoc.CopyTo=curdoc.getitemvalue(“CreatedBy”)(0)
Call Body.AppendText(“An Emergency Change Request has been submitted. Details are given below:”)