Handle multipart and single part messages