The following example shows you how to create task. Task will be created in Tasks folder inside user's mailbox.