Javascript Array And Array Operations Cpp Emails Not Sending