4 ms·
var message = GmailApp.getMessageById(newMessageId); if(!message.getFrom().match(/@gmail.com>?$/)) { message.moveToTrash(); }
by easrng 5y ago
var message = GmailApp.getMessageById(newMessageId);
if(!message.getFrom().match(/@gmail.com>?$/)) {
message.moveToTrash();
}