![]() ![]() Iterating through Outlook Accountsīefore we can go through each folder and email in Outlook, we need to find an actual account, and build the root folder from this. ![]() You also need to have Microsoft Outlook installed on your PC - otherwise the Interop assembly has nothing to talk to. It extends the Outlook 20 Developer Reference from the COM environment to the managed environment, allowing to you interact with Outlook from a. The Outlook Primary Interop Assembly (PIA) Reference provides help for developing managed applications for Outlook 20. The application makes use of the assembly, so you'll need to add this as a reference in your project. Prerequisitesįirstly, create a C# console application in Visual Studio, targeting the. It is relatively trivial to exclude your own email address - simply ammend the add_address_to_list() function to check for your address and not add it if found. One limitation is that your email address is likely to be in the list of recipients (how else would you have received the message!), so it is likely your address will have the highest counter value. Parse each message, saving its sender address and all recipientsĬurrently, the application extracts each message's sender email address, and it also iterates through all CC'd addresses.Iterate through each email message in each folder.Iterate recursively through the folder structure.Find the root folder in the Outlook Datastore.This application performs a few simple tasks required to extract a listing of email addresses (and a counter for how often each is used). There are also a number of commercial applications to extract email addresses, but why pay money when you can just use a few lines of code? :-) The Application The 'old fashioned' way of doing this is to export the mailbox to a CSV file, and only include email addresses as a field.īut with large mailboxes, this can be time consuming and cumbersome, and Outlook will often include internal sender IDs instead of email addresses, which are not overly useful. Sometimes, it's handy to be able to easily extract a list of email addresses from your Outlook PST or OST file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |