/ Forums / Advansys Formativ / Creating Solutions with Formativ / Where are all the other recipients?

  • Creator
  • #3923

    I am attempting to write a formativ applet to send an email to all (cc) recipients of an appointment. When the appointment is deleted, an event is triggered that activates the applet. What I want to do is to is to extract all email addresses in the ‘cc’ field. However, it does not matter if I inadvertently add all recipients. The basic code of the applet (that demonstrates a problem …) that I currently have is:

    Set theAppt = Client.ClientState.CommandMessage
    for x = 1 to theAppt.Recipients.Count
    MsgBox( theAppt.Recipients.Item(x) & ” ” & x )

    This works (with the entries in a different order, depending on which of ‘to’ ‘cc’ or ‘bc’ are used) but only shows the first entry in each of the ‘to’ ‘cc’ or ‘bc’ fields. So if I have

    To: person1@ourDomain.com
    Cc: person2@ourDomain.com;person3@ourDomain.com
    Bc: person4@ourDomain.com

    the routine alerts:
    person2@ourDomain.com 1
    person4@ourDomain.com 2
    person1@ourDomain.com 3

    What has happened to person3?

    Am I doing something wrong? And is there an easier way to detect all ‘cc’ recipients?

  • Author
  • #6614

    Ok, I think I have narrowed down the cause of the person3 missing problem. In my test cases, person2 was a resource called ’39pp room 132′, and for some reason, the GW API was objecting to that name appearing in the CC list. Unsure why.

    However, it works with normal users and other resources.

    If anyone knows of a way to extract _just_ the cc recipients, please let me know.

    Support 2

    The following examples represent two different ways to extract the CC recipients.

      dim theAppt
      dim iRecipient
      Set theAppt = Client.ClientState.CommandMessage  
      for x = 1 to theAppt.Recipients.Count
        set iRecipient = theAppt.Recipients.Item(x)
        ' Display CC type only
        if (iRecipient.TargetType = fgwCC) then
          msgbox iRecipient.EmailAddress
        end if
        set iRecipient = nothing

      msgbox GroupWise.ItemGetText(theAppt.MessageID, itfCC)


    Advansys Support

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.