Added attachment support

Liked promised, here is the attachment support