I am working on a mail client using IMAP and I am looking for the command for receiving the attachments of a message.
You could use Context.IO's files resource to quickly and easily fetch attachments.
http://context.io/docs/2.0/accounts/files#get