Big emails in Gmail
As you know, Gmail does not allow sorting emails, in particular by size.
There is a service that marks large letters with a label - www.findbigmail.com , but not everyone wants to give their password to anyone who is not clear.
I wrote a script (on the groove) that creates the label “Big Mail” and marks it with all letters larger than 4MB. In the script, you need to replace the user name and password in Gmail, as well as, if you want, the size of the "large" emails.
For the script to work in the classpath, there must be jars from here .
Message iteration is slow (1-2 per second), so I set the number of the message being viewed to be printed so that you know that the script is not stuck.
It takes a little time to collect all messages even with my quantity (approx. 20,000). But when accessing the message attributes (getSize ()) Message will go to the server.
You can set this to Pre Fetch , then the total time may decrease, but the time for receiving a list of messages (i.e. you will wait without knowing whether he is alive at all) will increase (and seriously)
Another interesting point: copyMessages () when applied to Gmail doesn’t copies or transfers, but simply adds a label.
I mark messages one at a time, so that it doesn’t turn out that the script crashes (for example, because the network crashed) and did nothing.
In general, there is much to improve - interactively ask for a username and password, do not mark those that are already marked, etc. Who needs it - will finish :)
Remember to do IMAP - enable in the Gmail settings.
There is a service that marks large letters with a label - www.findbigmail.com , but not everyone wants to give their password to anyone who is not clear.
I wrote a script (on the groove) that creates the label “Big Mail” and marks it with all letters larger than 4MB. In the script, you need to replace the user name and password in Gmail, as well as, if you want, the size of the "large" emails.
For the script to work in the classpath, there must be jars from here .
Message iteration is slow (1-2 per second), so I set the number of the message being viewed to be printed so that you know that the script is not stuck.
It takes a little time to collect all messages even with my quantity (approx. 20,000). But when accessing the message attributes (getSize ()) Message will go to the server.
You can set this to Pre Fetch , then the total time may decrease, but the time for receiving a list of messages (i.e. you will wait without knowing whether he is alive at all) will increase (and seriously)
Another interesting point: copyMessages () when applied to Gmail doesn’t copies or transfers, but simply adds a label.
I mark messages one at a time, so that it doesn’t turn out that the script crashes (for example, because the network crashed) and did nothing.
In general, there is much to improve - interactively ask for a username and password, do not mark those that are already marked, etc. Who needs it - will finish :)
Remember to do IMAP - enable in the Gmail settings.
// Mark large email messages in Gmail by "Bim Mail" label. |
Java2html |