Python Single Page Gmail Client is a simple Python script for sending and reading emails from Gmail using SMTP and IMAP.
- π Login to Gmail using SMTP and IMAP
- π© Send emails with attachments
- π¬ Read emails from Inbox and Sent Mail
- π Search emails by keyword
- π Automatic reconnect mechanism if the connection is lost
Make sure Python 3.x is installed, then run the following command to install dependencies:
pip install smtplib imaplib email getpass
- Run the script:
python gmailClient.py
- Enter your Gmail address and App Password (not your regular password).
Note: Enable 2FA on your Gmail account, then create an App Password from Google Security
- Use the interactive menu to send or read emails.
This script uses Gmail's default servers:
- SMTP Server:
smtp.gmail.com
(port587
) - IMAP Server:
imap.gmail.com
(port993
)
This project is licensed under the MIT license. Feel free to use and modify it as needed.