If you can use an email program to access your email, you can download all your emails, export them to files on your HDD, then have a python script go through them and save all the "from" and "to" email addresses to a csv file. Should be pretty simple.