CreateItem method

Future<void> CreateItem(
  1. Item item,
  2. FolderId? parentFolderId,
  3. MessageDisposition? messageDisposition,
  4. SendInvitationsMode? sendInvitationsMode,
)
Creates an item. Calling this method results in a call to EWS. The item to create. The Id of the folder in which to place the newly created item. If null, the item is created in its default folders. Indicates the disposition mode for items of type EmailMessage. Required if item is an EmailMessage instance. Indicates if and how invitations should be sent for item of type Appointment. Required if item is an Appointment instance.

Implementation

Future<void> CreateItem(
  Item item,
  FolderId? parentFolderId,
  MessageDisposition? messageDisposition,
  SendInvitationsMode? sendInvitationsMode,
) {
  return InternalCreateItems(
    [item],
    parentFolderId,
    messageDisposition,
    sendInvitationsMode,
    ServiceErrorHandling.ThrowOnError,
  );
}