Attachment support

I've added some basic attachment support and have used it to send text-based attachments but it should work for most attachment types I suspect.