This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update the email address below | |
// Schedule to run every 30 minutes at https://script.google.com/ | |
function phish() { | |
const threads = GmailApp.search("newer_than:30m"); | |
const totalSpammed = 0; | |
threads.forEach((thread) => { | |
thread.getMessages().forEach((message) => { | |
if(message.getHeader("X-PHISHTEST") !== "") { | |
thread.moveToSpam(); | |
totalSpammed++; |
OlderNewer