Delete mail from everywhere in domain

265 views
Skip to first unread message

Sarvesh Kumar

unread,
Jun 22, 2022, 2:33:45 AM6/22/22
to GAM for Google Workspace
Is there a way for admin to delete a message from all recipients' inboxes (read or unread doesn't matter)? 

I have tried deleting a  message with gmail api with message id and it works well. But that deletes from my inbox only.

Regards,
Sarvesh.


"If you want to be a leader who attracts quality people, the key is to become a person of quality yourself." - Jim Rohn


VCO Inspiration

James SEYMOUR

unread,
Jun 22, 2022, 3:21:22 AM6/22/22
to GAM for Google Workspace
Hi Sarvesh,

This should work, where the <message ID> is something like RCexxxxxx...@mail.gmail.comRCexxxxxx...@google.com or RCexxxxxx...@ismtpd0001p1lon1.sendgrid.net depending on what created the email.

gam all users delete messages query "rfc822msgid:<message ID>" doit

Cheers

James

Ross Scroggs

unread,
Jun 22, 2022, 10:48:56 AM6/22/22
to google-ap...@googlegroups.com
Sarvesh,

The command James shows will do what you want. GAM always includes all folders in this case, including Spam and Trash.

Ross

Jerudong International School
https://www.jerudonginternationalschool.com
Follow us on:
http://www.facebook.com/jisbruneidarussalam http://www.twitter.com/jisbrunei http://www.instagram.com/jisbrunei https://www.youtube.com/user/JISBrunei https://www.flickr.com/photos/133960569@N03/albums

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/c99a1e5a-f853-4557-adab-891b60d9481fn%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages