How I could set up a listener and for an event (new email in my mailbox) in Outlook with MATLAB?

7 ビュー (過去 30 日間)
I need to listen the mails (of my Outlook mailbox) and if a new mail comes in my mailbox to trigger a function.


Mario Malic
Mario Malic 2021 年 5 月 31 日
When numUnreads changes, you can run your function.
hOutlook = actxserver('Outlook.Application');
nameSpace = hOutlook.GetNamespace("MAPI");
inboxFolder = nameSpace.GetDefaultFolder(6); %
numUnreads = inboxFolder.UnReadItemCount
  5 件のコメント
Elisa Hid
Elisa Hid 2021 年 12 月 30 日
I am unsure about how I should proceed with this, as I am not familiar with events and listeners. As far as I understood, the event is triggered when a property of a handle class (using the handle class notify method) changes. So where exactly should your code snippet be placed? Under the properties block of the class definition? Thanks in advance


その他の回答 (0 件)


Find more on Earth and Planetary Science in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by