exchangelib.items.post API documentation

# Module `exchangelib.items.post`

## Classes

`class PostItem (**kwargs)`
  Expand source code

      class PostItem(Item):
          """MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/postitem"""

          ELEMENT_NAME = "PostItem"

          conversation_index = Message.FIELDS["conversation_index"]
          conversation_topic = Message.FIELDS["conversation_topic"]

          author = Message.FIELDS["author"]
          message_id = Message.FIELDS["message_id"]
          is_read = Message.FIELDS["is_read"]

          posted_time = DateTimeField(field_uri="postitem:PostedTime", is_read_only=True)
          references = TextField(field_uri="message:References")
          sender = MailboxField(field_uri="message:Sender", is_read_only=True, is_read_only_after_send=True)

  MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/postitem

  Pick out optional 'account' and 'folder' kwargs, and pass the rest to the parent class.

  :param kwargs: 'account' is optional but allows calling 'send()' and 'delete()' 'folder' is optional but allows calling 'save()'. If 'folder' has an account, and 'account' is not set, we use folder.account.

  ### Ancestors

  - Item
  - BaseItem
  - RegisterMixIn
  - IdChangeKeyMixIn
  - EWSElement

  ### Instance variables

  `var author`

    The type of the None singleton.

  `var conversation_index`

    The type of the None singleton.

  `var conversation_topic`

    The type of the None singleton.

  `var is_read`

    The type of the None singleton.

  `var message_id`

    The type of the None singleton.

  `var posted_time`

    The type of the None singleton.

  `var references`

    The type of the None singleton.

  `var sender`

    The type of the None singleton.

  ### Inherited members

  - `Item`:
    - `ELEMENT_NAME`
    - `FIELDS`
    - `ID_ELEMENT_CLS`
    - `INSERT_AFTER_FIELD`
    - `NAMESPACE`
    - `add_field`
    - `attach`
    - `attachments`
    - `body`
    - `categories`
    - `conversation_id`
    - `culture`
    - `datetime_created`
    - `datetime_received`
    - `datetime_sent`
    - `deregister`
    - `detach`
    - `display_cc`
    - `display_to`
    - `effective_rights`
    - `has_attachments`
    - `headers`
    - `importance`
    - `in_reply_to`
    - `is_associated`
    - `is_draft`
    - `is_from_me`
    - `is_resend`
    - `is_submitted`
    - `is_unmodified`
    - `item_class`
    - `last_modified_name`
    - `last_modified_time`
    - `mime_content`
    - `parent_folder_id`
    - `register`
    - `reminder_due_by`
    - `reminder_is_set`
    - `reminder_minutes_before_start`
    - `remove_field`
    - `response_objects`
    - `sensitivity`
    - `size`
    - `subject`
    - `supported_fields`
    - `text_body`
    - `unique_body`
    - `validate_field`
    - `web_client_edit_form_query_string`
    - `web_client_read_form_query_string`
`class PostReplyItem (**kwargs)`
  Expand source code

      class PostReplyItem(Item):
          """MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/postreplyitem"""

          ELEMENT_NAME = "PostReplyItem"

          # This element only has Item fields up to, and including, 'culture'
          # TDO: Plus all message fields
          new_body = BodyField(field_uri="NewBodyContent")  # Accepts and returns Body or HTMLBody instances

          culture_idx = Item.FIELDS.index_by_name("culture")
          sender_idx = Message.FIELDS.index_by_name("sender")
          FIELDS = Item.FIELDS[: culture_idx + 1] + Message.FIELDS[sender_idx:]

  MSDN: https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/postreplyitem

  Pick out optional 'account' and 'folder' kwargs, and pass the rest to the parent class.

  :param kwargs: 'account' is optional but allows calling 'send()' and 'delete()' 'folder' is optional but allows calling 'save()'. If 'folder' has an account, and 'account' is not set, we use folder.account.

  ### Ancestors

  - Item
  - BaseItem
  - RegisterMixIn
  - IdChangeKeyMixIn
  - EWSElement

  ### Class variables

  `var culture_idx`

    The type of the None singleton.

  `var sender_idx`

    The type of the None singleton.

  ### Instance variables

  `var author`

    The type of the None singleton.

  `var bcc_recipients`

    The type of the None singleton.

  `var cc_recipients`

    The type of the None singleton.

  `var conversation_index`

    The type of the None singleton.

  `var conversation_topic`

    The type of the None singleton.

  `var is_delivery_receipt_requested`

    The type of the None singleton.

  `var is_read`

    The type of the None singleton.

  `var is_read_receipt_requested`

    The type of the None singleton.

  `var is_response_requested`

    The type of the None singleton.

  `var message_id`

    The type of the None singleton.

  `var new_body`

    The type of the None singleton.

  `var received_by`

    The type of the None singleton.

  `var received_representing`

    The type of the None singleton.

  `var references`

    The type of the None singleton.

  `var reminder_message_data`

    The type of the None singleton.

  `var reply_to`

    The type of the None singleton.

  `var sender`

    The type of the None singleton.

  `var to_recipients`

    The type of the None singleton.

  ### Inherited members

  - `Item`:
    - `ELEMENT_NAME`
    - `FIELDS`
    - `ID_ELEMENT_CLS`
    - `INSERT_AFTER_FIELD`
    - `NAMESPACE`
    - `add_field`
    - `attach`
    - `attachments`
    - `body`
    - `categories`
    - `conversation_id`
    - `culture`
    - `datetime_created`
    - `datetime_received`
    - `datetime_sent`
    - `deregister`
    - `detach`
    - `display_cc`
    - `display_to`
    - `effective_rights`
    - `has_attachments`
    - `headers`
    - `importance`
    - `in_reply_to`
    - `is_associated`
    - `is_draft`
    - `is_from_me`
    - `is_resend`
    - `is_submitted`
    - `is_unmodified`
    - `item_class`
    - `last_modified_name`
    - `last_modified_time`
    - `mime_content`
    - `parent_folder_id`
    - `register`
    - `reminder_due_by`
    - `reminder_is_set`
    - `reminder_minutes_before_start`
    - `remove_field`
    - `response_objects`
    - `sensitivity`
    - `size`
    - `subject`
    - `supported_fields`
    - `text_body`
    - `unique_body`
    - `validate_field`
    - `web_client_edit_form_query_string`
    - `web_client_read_form_query_string`