Support inline attachments

Addresses issue #398