fix the sending & creating mail with attachments