Я читаю почту в Outlook, которая содержит настроенные теги/флаги. Среди которых есть тег Approved. Я пытаюсь получить доступ к почте от конкретного отправителя, чей тег одобрен с использованием библиотеки ExchangeLib в python.
Я пробовал несколько методов, доступных в библиотеке ExchangeLib, но безуспешно. Я просто хотел распечатать этот тег Approved в консоли. Я пробовал с помощью следующих методов:
ID_ELEMENT_CLS account add_field attach attachments body categories conversation_id culture datetime_created datetime_received datetime_sent deregister detach display_cc display_to effective_rights folder 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
Python — 3.7 Exchangelib — 3.3.2
Изображение Customized_Tags содержит утвержденный тег
см. ниже Привязку кода:
from exchangelib import Credentials, Account
credentials = Credentials('[email protected]', 'topsecret')
account = Account('[email protected]', credentials=credentials, autodiscover=True)
for item in account.inbox.all().order_by('-datetime_received')[:100]:
#below is my requirement
if item.tag == "Approved":
print(item.tag, item.sender)
else:
pass