0

Can there be a Gmail Gadget App that permanently blocks or deletes spam?

Phong mentions the following in his answer to the question How can I auto-delete some spam from Gmail?

If cluttering your Trash is not desirable, you could filter those messages to a temporary label instead, then use an Apps Script to periodically delete "old" filtered spam from that label. That would ensure that the top of your Trash is clutter-free. If the volume of spam you receive is limited however, deleting might work just fine.

But I don't know how one would "use an Apps Script" for this purpose.

  • This seems to me that you're asking for an app recommendation. That's probably what attracted the downvote. – ale Oct 17 '15 at 15:46
2

The suggestion you quoted cannot be implemented: Apps Script can move threads to Trash or Spam but cannot delete them permanently. Source: a Google employee's answer on Stack Overflow:

It is not possible, by design, to delete an email permanently using GmailApp.

If you wonder why this restriction is in place, imagine that you made an error coding your script (e.g., put == instead of != somewhere), causing it to delete all of your emails forever with no option for recovery.


So, you have to either:

  1. Move spam to Spam folder and wait 30 days for it to be deleted (note that Spam is separate from Trash, so "cluttering your Trash" is not an issue)
  2. Delete manually
  3. Have a browser-automation script deleting messages as you, i.e., logging in to Gmail through a browser and "clicking" buttons in the interface. This sort of automation has more to do with a particular browser than with web application.
  • Ok, thank you for the answer @NormalHuman. It continues to baffle me as to why there are no simple ways to thwart low-life spammers and why services such as Gmail, YahooMail and the like condone their tactics by not implementing tools that allow us to decide whether we want permit spammers to exist or not. – tammy Oct 17 '15 at 4:09
  • I don't think Google condones spammers tactics. Google's spam filters are some of the best I've encountered. I hardly ever get a false negative and even fewer false positives. – ale Oct 17 '15 at 17:20
  • I fully understand tall he mechanics involved in mail movement between folders and clicking delete buttons. If you wonder why this restriction is in place, imagine that you made an error coding your script (e.g., put == instead of != somewhere), causing it to delete all of your emails forever with no option for recovery. Let that be on me :) I would rather lose the casual email than continue to condone the practice of spam. – tammy Oct 17 '15 at 19:09
  • Imagine the notion that a salesperson makes 100 cold calls and lands 1 sale as a result. That salesperson had success. Imagine if there was no physical way for the salesperson to make a call...then no chance for success. Extrapolate that to spammers and all I am wondering is why the mail services permit spammers to exist regardless of where their messages land. Spammers would not spam if they did not get at least one sucker to look in their trash bin, fall for the click and actually grant success to the nature spam. <more> – tammy Oct 17 '15 at 19:15
  • 1
    @tammy An erroneous script could delete all of your email, for all time, ever. If avoiding spam is more important for you than that, there is an easy solution: delete your Gmail account, never have any email accounts. No more spam, problem solved. – user79865 Oct 17 '15 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.