Processing attachments RRS feed

  • Question

  • Hi

    How can I extract attachments from emails coming to Exchange Online and save them to local file system?



    Tuesday, August 29, 2017 1:38 AM

All replies

  • Hi Rahul

    When email arrives I need to look for all attachments with extension FDF and download them locally so we can use the data in it for a local app. We have currently done this for our on-premises Exchange via custom routing agent that we developed. We intend to move to Exchange Online so require something similar.



    Tuesday, August 29, 2017 11:43 AM
  • Your only option would be to look into EWS to accomplish this

    Search, Recover, Export Mailboxes, Folders, Email, Contacts, Calendars, Tasks, etc. from Offline Exchange Databases (EDBs), On-Premise Exchange Servers and Office 365. Migrate/Recover direct from any offline EDB into any On-Premises Exchange Server, even cross version i.e. 2003 → 2007 → 2010 →2013 → 2016 → Office 365 with Lucid8's DigiScope

    Tuesday, August 29, 2017 12:19 PM
  • Because you can't use Transport Agents on Office365 you need to try to work around that issue. If its just a passive process (eg you not modifying or removing the attachment at all) you could use a Transport Rule on incoming message to send a Copy to one particular Mailbox (eg a hidden mailbox so users can't see it) and then use EWS or REST to connect to that mailbox and download the attachments for EWS or REST and delete the messages once you have processed it.


    Tuesday, August 29, 2017 9:54 PM