Support for inline attachments

This change would allow for using getAttachments() to show inline attachments as well. The code works, but it doesn't look that good. Feel free to fix it :)