This GUI python application is for sending and receiving emails. The project consists of three main files:
project-folder/
├── SendEmail.py # Handles sending emails via SMTP protocol
├── ReceiveEmail.py # Handles receiving emails via IMAP protocol
└── app.py # Serves as the main entry point to the application, integrating the sending and receiving functionalities
- Interactive GUI interface.
- Login.
- Receive and read emails from an inbox.
- Error Handling.
Ensure you have Python installed (preferably Python 3.x). You can check your Python version by running:
python --versiongit clone https://github.com/shahdelrefai/Email_Client_App.git
cd Email_Client_AppThis application requires Python built in libraries which are: tkinter, smtplib, imaplib, email, os, timeand datetime, so need for installations.
To start the application, run:
python app.pyThe application relies on the following libraries:
tkinter(for GUI)smtplib(for sending emails)imaplib(for receiving emails)email(for handling email content)os(for notifications)
Make sure you use a valid gmail address along with a valid app password.
This class is responsible for sending emails using the smtplib module. The main steps include:
- Import necessary modules: Imports
smtplib,email.mimecomponents, and other required libraries. - Set up SMTP connection: Connects to an SMTP server (e.g., Gmail, Outlook) using login credentials.
- Create the email message: Uses
MIMEMultipartto create the email body and attach files if needed. - Send the email: Uses
smtp.sendmail()to send the email to the specified recipient(s).
This script retrieves emails from an inbox using the imaplib module. The main steps include:
- Import necessary modules: Includes
imaplib,email, and related utilities for parsing messages. - Connect to IMAP server: Logs into the email account using credentials.
- Select inbox and search for emails: Uses IMAP queries to find unread or specific emails.
- Fetch email contents: Reads email data, extracts the subject, sender, and body.
- Handle attachments (if any): Saves and processes any email attachments.
- Close the connection: Ensures the IMAP session is closed properly.
This script serves as the main entry point, integrating the sending and receiving functionalities. The main steps include:
- Import
SendEmailandReceiveEmailmodules. - Provide a GUI interface:
- Login page.
- Inbox page.
- Compose email page.