
Good time friends day. Yesterday I encountered not everything with the usual puzzles, which pushed me to create another utility that simplifies life. It so happened that the task was given to save all the letters from the mail.ru mail server from the folder - Sent, for several dozen users, to a local disk with further import into the mailer. There was nothing difficult in principle, but alas, the mail.ru mail server deprived us of a wonderful imap. And this meant that it was necessary to somehow get out.
The idea to save each letter manually, immediately disappeared, in the folder there are about 2000 outgoing letters and this is only for one user. Ran through the other boxes, the picture loomed grand. Began to search the Internet for the presence of a program that can cope with this task, but except as parsers, grabbers, etc. Underground software, apparently nothing was invented.
There was no help from where, and I was used to solving such problems myself, I sat down to write a utility that would save us all. I decided to write on Autoit. Drew a short plan:
1. Authorization on the mail.ru mail server
2. Use the mobile web version so that not everything is so overloaded
3. Getting the number of pages in the Outbox
4. Analysis of each page with the generation of direct links to download
5. Saving to the hard disk in the folder with the name of the export-outbox type in eml format
')
As the utility was being written, the ability to save all other folders, Inbox, Drafts, Spam, Deleted was added. Here's what happened:
First, we will edit the script by ourselves, enter the login, password, domain (
$ login, $ paswd, $ domain ). In the
$ target variable, enter the folder code that we would like to save to the local disk, in our case the following table appeared:
0 = Inbox
500,000 = Sent
500001 = Drafts
500002 = Deleted
950 = Spam
The second option with the value
500000 was useful to me, the corresponding folder is Sent.
The visual script code, unfortunately, cannot be inserted, habrapriser eats regular expressions and the topic skews terribly, you can see and download the script here: Watch the codeAfter working out the script, all our letters were successfully saved in a folder in the eml format, which were later imported into the mail program. Perhaps he invented the bicycle, but honestly and for a long time Google used similar software, but to no avail.
Thanks for attention. Regards, Alexey