Implementation features: Use VBS to retrieve messages for a title in Outlook local mailbox today.
The code is as follows:
ConstC_date_format_mail_filter_from =1 'yyyy-m-d 0:00 AMConstC_date_format_mail_filter_to =2 'yyyy-m-d 11:59 PMFunctionCheckmail (Pmailfolder, Pmailtitle) on Error Resume Next DimObjolappDimobjNameSpaceDimobjfolderDimstrfilter Checkmail=False SetObjolapp =CreateObject("Outlook.Application") SetobjNameSpace = Objolapp.getnamespace ("MAPI") 'olFolderInbox 6 default Inbox Setobjfolder = Objnamespace.getdefaultfolder (6). Folders (Pmailfolder)IfErr.Number <>0 ThenAddlog ("Message Access error:"&err.description) Wscript.Quit-1 End If 'Filter Conditionsstrfilter ="[Subject] = '"&Pmailtitle _&"' and [Receivedtime] >= '"&FormatDate (now (), C_date_format_mail_filter_from) _&"' and [Receivedtime] <= '"& FormatDate (now (), c_date_format_mail_filter_to) &"'" 'Search IfObjFolder.Items.Restrict (strfilter). Count >0 ThenCheckmail=True End IfEnd Function'date FormattingFunctionformatdate (pDate, PFlag)Dimy, M, D formatdate="" If IsDate(pDate) =False Then Exit Functiony=CStr( Year(pDate)) m=CStr(Month(pDate)) d=CStr( Day(pDate))Select CasePFlag CaseC_date_format_mail_filter_from'yyyy-m-d 0:00 AM fromFormatDate = y &"-"& M &"-"& D &"0:00 AM" Casec_date_format_mail_filter_to'yyyy-m-d 11:59 PM toFormatDate = y &"-"& M &"-"& D &"11:59 PM" End SelectEnd Function
"VBS" retrieves outlook on-premises mailboxes