Skip to content

shahdelrefai/Email_Client_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shahd's Email Client Application Documentation

Overview

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

Features

  • Interactive GUI interface.
  • Login.
  • Receive and read emails from an inbox.
  • Error Handling.

Installation

Prerequisites

Ensure you have Python installed (preferably Python 3.x). You can check your Python version by running:

python --version

Clone the Repository

git clone https://github.com/shahdelrefai/Email_Client_App.git
cd Email_Client_App

Install Dependencies

This application requires Python built in libraries which are: tkinter, smtplib, imaplib, email, os, timeand datetime, so need for installations.

Usage

Running the Application

To start the application, run:

python app.py

Dependencies

The 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)

Login Authentication

Make sure you use a valid gmail address along with a valid app password.

Code Walkthrough

EmailSender class inside SendEmail.py

This class is responsible for sending emails using the smtplib module. The main steps include:

  1. Import necessary modules: Imports smtplib, email.mime components, and other required libraries.
  2. Set up SMTP connection: Connects to an SMTP server (e.g., Gmail, Outlook) using login credentials.
  3. Create the email message: Uses MIMEMultipart to create the email body and attach files if needed.
  4. Send the email: Uses smtp.sendmail() to send the email to the specified recipient(s).

EmailReceiver class inside ReceiveEmail.py

This script retrieves emails from an inbox using the imaplib module. The main steps include:

  1. Import necessary modules: Includes imaplib, email, and related utilities for parsing messages.
  2. Connect to IMAP server: Logs into the email account using credentials.
  3. Select inbox and search for emails: Uses IMAP queries to find unread or specific emails.
  4. Fetch email contents: Reads email data, extracts the subject, sender, and body.
  5. Handle attachments (if any): Saves and processes any email attachments.
  6. Close the connection: Ensures the IMAP session is closed properly.

app.py

This script serves as the main entry point, integrating the sending and receiving functionalities. The main steps include:

  1. Import SendEmail and ReceiveEmail modules.
  2. Provide a GUI interface:
    • Login page.
    • Inbox page.
    • Compose email page.

Tests

1. Login

1.1 Invalid input formats

Screenshot 2025-03-15 at 7 11 04 AM Screenshot 2025-03-15 at 7 14 03 AM

1.2 Account authentication failure

Screenshot 2025-03-15 at 7 14 41 AM

1.3 Login Successful

Screenshot 2025-03-15 at 7 16 32 AM

2. Inbox

2.1 Mailbox

Screenshot 2025-03-15 at 7 47 52 AM

2.2 Email body (when email pressed)

Screenshot 2025-03-15 at 7 50 28 AM

2.3 New Email Notification

Screenshot 2025-03-15 at 7 51 21 AM

2.4 Automatic refresh after 3 seconds from receiving notification

Screenshot 2025-03-15 at 7 51 36 AM

3. Email Compose

Screenshot 2025-03-15 at 7 53 26 AM

3.1 Error Handling

Screenshot 2025-03-15 at 7 55 15 AM

3.2 Sending

Screenshot 2025-03-15 at 7 56 48 AM Screenshot 2025-03-15 at 7 59 07 AM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages