Hey all, sometimes I get requests to search a user's email for a specific student or topic because they need to collect communication related to it for legal reasons or a meeting and the original user doesn't work for us anymore.
What best practices have you found for how to do this? In the past we've just given them access to the user's account or email delegate access, but I'm trying to see if there's a way to use GAM for this. Some things I've looked into so far:
- Searching a user's email for a topic with the command and returning a spreadsheet showing the search results
`gam user <email> print messages query '<queryText>' todrive` - Then they can tell me which messages they're interested in, I can grab the message IDs, and use the following command to see the contents of the email, but it shows the raw HTML of the email
`gam user <email> print messages query 'rfc822msgid:"<messageID>"' showbody todrive` (or replace todrive with `> email.txt` to get a text file) - I've also tried forwarding the thread using this command, but I get an error
Command: `gam user <email> forward threads to <recipientEmail> query 'rfc822msgid:"<messageID>"' doit
Error message: `Forward Failed: 'ascii' codec can't encode character '\xa9' in position 62: ordinal not in range(128)`
Ultimately what I'm looking for is a way for me to easily pass it on to admin and say "here's all those emails you requested" in a format that makes sense to them, whether that's forwarded emails or a folder of PDFs. But they're not going to want to deal with seeing the raw code of an email.