Gmail has made it easy for you to unsubscribe from email newsletters and other bulk mail. You can open a message, click the “unsubscribe” link and Gmail will automatically remove your email address from the mailing list. This option is however only available on the Gmail website and not if you are using Gmail on the mobile phone or accessing Gmail through an app like Outlook or Dropbox’s MailBox.
There are third-party services, Unroll.me for example, that let you remove yourself from unsolicited bulk email but you’ll have to grant access to your entire Gmail mailbox and Google contacts to them. The service is no doubt convenient but would I be willing to give full access to my email account to a third-party? Probably not.
Christian Heilmann’s tweet – Feature request for Gmail: automatically find and follow the unsubscribe link in all highlighted mails – prompted me to research this topic in a bit more detail and it turned out that building an automated system for unsubscribing from bulk email isn’t that difficult. Here’s how it looks like:
How to Unsubscribe from Bulk Mail in Gmail
What I have now is a simple Google Script that parses the content of bulk emails and find the unsubscribe link. If the link is found, the script opens the link and the email is unsubscribed. In some cases, the bulk sender would require you to send a message to a special email address to unsubscribe and the script can do that as well.
You don’t have to grant access to your Gmail account to any service, you can unsubscribe without even open the email (faster) and you can add emails to the unsubscribe queue from any email client including desktop and mobile apps. Let’s get started:
- Click here to copy the Gmail Unsubscriber sheet to your Google Drive.
- Go to the Gmail menu in the sheet (see screenshot) and choose Authorize. All the script access to your Gmail account. It is an open source Google Script that runs in your own Drive and not a single byte of data is shared with anyone.
- From the same menu, choose Start and pick a name for your Gmail label (the default is Unsubscribe). Save your changes
The Gmail Unsubscriber program is now initialized and running in the background. You can apply the Unsubscribe label to any Gmail message and you’ll be automatically unsubscribed in 10-15 minutes. Everything is logged in the Google Sheet so you know what’s happening behind the scenes. Give it a try!
How Gmail Unsubscribes from Mailing Lists
All legitimate bulk email senders include a List-Unsubscribe field in the message header that contains a URL or email address for unsubscribing from a mailing list. Here’s a screenshot:
You can view these details by opening any bulk message inside Gmail and choosing “Show Original” from the menu. In other cases, the unsubscribe link may be included in the message body with the anchor text like “click here to unsubscribe” – the script is smart enough to recognize all such links, it opens them for you and removes your email address from the mailing list.