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

#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