This function manages emails in Gmail account by performing actions like delete, archive, mark as important, unimportant, report as spam, star, unstar, report as phishing, or mute. It accepts a list of email IDs for batch processing and uses the Gmail API to execute the action