Export (0) Print
Expand All

Recipients.setAsync method (JavaScript API for Office)

apps for Office

Begins an asynchronous request to set the recipient list for an appointment or message. This method was introduced in version 1.1.

Last modified: March 04, 2015

Hosts:Outlook

App type: Mail

Available in requirement sets

Mailbox

Last changed in Mailbox

1.1

Applicable Outlook modes

Compose

See all support details

Office.context.mailbox.item.[to,cc,bcc,requiredAttendees,optionalAttendees,resources].setAsync(recipients, [options,] callback);

recipients

The recipients to add to the recipients list. See the Remarks section for details.

options

Any optional parameters or state data passed to the method. Optional.

callback

The method to call when the recipient list is returned. Optional.

The setAsync method starts an asynchronous call to the Exchange server to set the recipient list for an appointment or message. Setting a recipient list overwrites the current list, and forces the email addresses to be resolved.

The recipients parameter can be an array of any one of the following:

Note Note

The array must contain fewer than 100 entries.

  • String SMTP addresses.

  • An array of dictionaries in the format shown in the following code.

    {
       {
          "displayName":"Graham Durkin", 
          "emailAddress":"gdurkin@contoso.com"
       },
       {
          "displayName" : "Donnie Weinberg",
          "emailAddress" : "dweinberg@contoso.com"
       }
    }
       
    

    The "displayName" entry has a maximum length of 255 characters.

  • An array of EmailAddressDetails objects, such as the one returned by the getAsync method.

If you specify a callback method, the method is called with one parameter, asyncResult, which contains a code that indicates any error that occurred while adding the data.

Error code

Description

NumberOfRecipientsExceeded

The number of recipients exceeded 100 entries.

A checkmark (√) in the following table indicates that this property is supported in the corresponding Outlook host application. An empty cell indicates that the Outlook host application doesn't support this property.

For more information about Office host application and server requirements, see Requirements for running apps for Office.

Supported hosts, by platform

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

OWA for Devices

Office for Mac

Outlook

Available in requirement sets

Mailbox

Minimum permission level

ReadItem

App types

Mail

Library

Office.js

Namespace

Office

Version

Changes

1.1

Introduced

Show:
© 2015 Microsoft