I attempted to code a script that will open all emails found a domain in box.
2 queries
get user info
get file info
look through each line of message
1. check all emails
user emails will have an external and internal email
2. check for file number
if file number found save file number to message for insert
if no file number found
attempt to associate message to system user
- external email is a message not created from the system is forward to the internal email for saving
- internal email is one that is sent to external email and replied back to
3. get subject
4. save message html body seperately
5. construct insert of data