This Python script creates a temporary email address using your Gmail account and checks for incoming emails to that address. It uses the Gmail API to read emails and extract their content.
- Generates a temporary email address using your Gmail account.
- Checks for incoming emails to the temporary email address.
- Extracts and prints the content of the received email.
- Python 3.6 or higher
- Google API Client Library for Python
- Gmail API enabled on your Google account
-
Clone the repository:
git clone https://github.com/PushkarOP/TempGmail.git cd TempGmail
-
Install dependencies:
pip install -r requirements.txt
-
Enable the Gmail API:
- Go to the Google Cloud Console.
- Create a new project or select an existing project.
- Enable the Gmail API for your project.
- Create OAuth 2.0 credentials and download the
credentials.json
file. - Place the
credentials.json
file in the root directory of the project.
-
Update the base email:
- Open the
main.py
file. - Replace
change_here@gmail.com
with your actual Gmail address in theBASE_EMAIL
variable.
- Open the
-
Run the script:
python main.py
-
Follow the on-screen instructions to authenticate with your Google account.
-
The script will generate a temporary email address and start checking for incoming emails.
- The script checks for new emails every 10 seconds.
- The temporary email address is generated by appending random characters to your base email address.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.