1

I am trying to search outlook mail giving date as parameter in search.

right now I am searching full mailbox then filtering on the basis of received date but problem is by this way it is reading all mail each time. I want a solution where I can search directly by date interval so that it will return mails falling in between date interval.

library(RDCOMClient)

outlook_app <- COMCreate("Outlook.Application")
search<-outlook_app$AdvancedSearch("Inbox","urn:schemas:mailheader:date > '2019-05-22 00:14:10 IST'")
results <- search$Results()
results$Count()

I tried this but it is not working for me. I want all mails came after mentioned date.

user3837868
  • 917
  • 1
  • 12
  • 24
  • I think you will not be able to just use ">" to get the emails, just like it's point out in the stack's page where you get the code. I asked the member here : https://stackoverflow.com/questions/51964208/rdcomclient-outlook-email-search-using-date-in-r maybe he will give you an answer. – Gainz May 30 '19 at 14:14

1 Answers1

1

Do not specify the time zone (IST). '2019-05-22 00:14:10' is what you need.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78