How to Delete Old Emails in MS Exchange Using EWS

Background

I work within a corporate environment that manages its own Microsoft Exchange Server. I am also on a development team and receive thousands of automated email messages per day from various services that run across multiple servers. I started out creating rules for these emails in MS Outlook that sorted them into folders based on the service that generated them. I would go in once a day and clean out the folders. This is a bit tedious. Additionally, I want to keep emails that are within the last day in case something goes wrong with that service and I need to reference an email that was generated. Even more tedious.

Next I thought to myself, “Why don’t I use the built-in Outlook Archive method?” That would be a great option, but my company manages our archive policies, meaning I cannot modify them.

Finally, having all other avenues closed to me, I decided to write my own utility to perform this task. I am, after all, a Software Engineer.

Read moreHow to Delete Old Emails in MS Exchange Using EWS

Counting Messages in IMAP Folders in Python

Continuing on my last post (), I wanted to show a snippet of Python code that will list a set of IMAP folders and count the number of messages in them. You give it a starting folder and it lists that folder plus all/any sub-folders and their message counts. At the very end it prints …

Read moreCounting Messages in IMAP Folders in Python

Listing IMAP Mailboxes with Python

I’ve been working on some Python scripts recently to manage my IMAP mailboxes and the information I found on the internet was fairly good, but lacked a completeness that my newbie Python skills required. So, I figured I’d post a complete example to list mailboxes (folders) for your IMAP account. This was developed using Python …

Read moreListing IMAP Mailboxes with Python

Upload.sc – Easy File Sharing On The Go

Ever have a really big file that you need to share or send to someone? Isn’t it frustrating when your email server, or their email server, or your email software or something in between won’t allow you to send the file? Yes, I have had this frustration before as well. Now you can just go …

Read moreUpload.sc – Easy File Sharing On The Go