scastiel / protonmail-export

Export your ProtonMail e-mails. DEPRECATED, prefer ProtonMail Bridge: https://protonmail.com/bridge
54 stars 9 forks source link

Added option to specify App Version #18

Open Marcool04 opened 6 years ago

Marcool04 commented 6 years ago

Hi there! It seems, as I experienced today, that the x-pm-appversion header has a tendency to change rather often (with the versions… I guess). There are already three issues raised on the tracker related to this : #3, #7 and #11. Pull request #2 is an attempt at fixing this… but it's already broken before even being accepted since the app has bumped up in version since. Furthermore, #2 also changes the api version header x-pm-apiversion, but this does not seem necessary to actually get the email download to work (api version seems to be 3 right now, but even with x-pm-apiversion set to 1 download succeeds). The approach used in the present pull request which is to make the appversion into a user supplied argument seems like a more robust one to me, since the program already asks users to copy-paste info from the headers anyway. Let me know if there is anything looks wrong or needs fixing. Regards, Mark.