/ Forums / Advansys Formativ / Creating Solutions with Formativ / Add more recipients to a draft message

  • Creator
    Topic
  • #4215
    ManfredS
    Participant

      Hallo,

      how can i add more receipients to a draft message created with Formativ.

      How can CC or BC be set?
      How can i include the senders email address?

      e.g.
      ‘ Create a draft email message
      Set objDraft = GroupWise.Account.MailBox.Messages.Add(4)

      Empfaenger = settings.txt_sendto.Text
      objRecipient = objDraft.Recipients.Add(Empfaenger,,0)


      objDraft.Recipients.Add(objDraft.Sender.EmailAddress,,0)
      ….
      Thanks for help

    • Author
      Replies
    • #7510
      Support 3
      Participant

        quote:


        How can CC or BC be set?


        You can set the recipients using the Object API or Token API.

        Object API
        call objDraft.Recipients.Add(“test1@domain.com”, “”, fgwTo)
        call objDraft.Recipients.Add(“test2@domain.com”, “”, gwCC)
        call objDraft.Recipients.Add(“test3@domain.com”, “”, gwBC)

        Token API
        call groupwise.itemsettext(“X00”, itfTo, “test1@domain.com”, true)
        call groupwise.itemsettext(“X00”, itfCC, “test2@domain.com”, true)
        call groupwise.itemsettext(“X00”, itfBC, “test3@domain.com”, true)

        “X00” is active compose message ID. I will recommend to create the draft message in Work-In-Progress folder instead Mailbox folder.
        Set objDraft = GroupWise.Account.workfolder.Messages.Add(fgwdraft)

        quote:


        How can i include the senders email address?


        See the sample code below to add the selected message’s sender email address. You need to place error handling incase no message selected in GroupWise client. See the “Visual Basic Script Guide” and “Formativ Language Guide” for details.

        set oMsg = client.clientstate.commandmessage
        call objDraft.Recipients.Add(oMsg.sender.emailaddress, “”, fgwTo)

        I hope this helps.

        Regards,
        Advansys Support

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