Spaghetti code, i know. I tried to make it easy to read and to edit. But i'm not that good at Powershell. (yet)
If you have any questions or want to help make the script better, please contact me :)
The main reason its a bit messy is beacuse i had to take out about 1000 lines of code which is being used later down the line for what i needed it for.
I tried to google to find a solution for my problem but didnt find anything so i tried to make my own.
It's slow because it searches through your entire default outlook inbox. I don't know how to make it faster.