javascript contador Skip to content

How to create a temporary email using your own Gmail account

gmail temporal

On many occasions it is necessary to create a temporary email account, one that is only active for a week, a month … long enough to carry out a test or participate in a project, and after that time we stop receiving emails in that account, as it will self-destruct automatically.

In the past we have already talked about some solutions to create temporary email accounts, but today I am going to explain how to do it with our lifelong gmail account.

Imagine that your account is micuenta@gmail.com. Logically, if someone sends you an email to that address, you will receive it in the inbox on a regular basis. If you disclose that account on a website, you risk receiving spam for a long time, and if you give it to someone for a temporary project, you can continue to receive emails from that project even after it has finished.

To avoid this, we may disclose our account as follows:

myaccount+01022021@gmail.com

In this way, all emails sent to that address will reach our box, but after January 2, 2021, they will stop doing so.

The format is

account+mmddyyyy@gmail.com (first the month, then the day and last the year), although we can skip the year and leave it only as account+mmdd@gmail.com.

To make it work you have to follow the following steps:

– Identified in your gmail, click here to make a copy of Google Script in your account.

– Within Google Script, go to line 13 and replace the existing email with the email address where we want the temporary emails to be forwarded.

– Go to the Run menu, choose Run function and select Initialize. Please allow the Google script and the disposable email system to be up and running.

The script will check the Gmail inbox every five minutes and process messages based on the expiration date in the To message field. You only have to set it up once and forget about it.

You can get more details about how the script works at labnol.org