Get attachments fix
Fix the way the attachments were fixed.
Originally, one function did:
- fetching the emails
- gettings all attachments
- returning all the attachments
The problem with this approach is that it can lead to many errors being handled is a single place, in an single batch. If only one email is wrongfully read during the fetch operation, the all batch will not be fetched.
Now, the emails are fetched in batch still but in a separate function, and each attachments of each emails is treated in the main functions. If one failed, the others should not be affected.