* changed functions to return a AttachmentPtr so we can get the cid (we will auto replace that later on)