The inline images always got also included as attachments. How can this be prevented?
There are 4 collections that may contain attachments:
If you want to iterate/get 'real' attachments only use IMail.NonVisuals collection
https://www.limilabs.com/blog/save-all-attachments-to-disk-using-imap