Email Spam Detection System Final Year Project with Source Code | Source Code
LIMITED TIME
Get Source Code ₹99
Real project UI Full source included

No live demo yet — message us for access

Our team shares demo access on WhatsApp within minutes

Email Spam Detection System Final Year Project with Source Code

Complete final-year project source code with frontend, backend, database, and setup guide. Instant download after secure payment.

  • MACHINE-LEARNING Stack
  • Instant Download
Secure CCAvenue payment Instant download link WhatsApp support

Choose your plan

Source Code Only

Full ZIP with frontend, backend, database & documentation.

₹99 one-time
  • Complete project source files
  • Database script included
  • How-to-run guide

What's in your download

Review features, setup steps, and credentials before you pay.

Project Overview

Description, tech stack, and what is included

Full source Frontend + backend
Database .sql file
Setup guide README included

Email Spam Detection System is a Python Flask based final year project developed for classifying email-like text as Spam or Ham using machine learning. This major project includes user authentication, user dashboard, spam prediction, prediction history, statistics, profile management, export options, admin dashboard, dataset upload, model training, metrics, confusion matrix, and global prediction management. Users can sign up, log in, analyze email subject and body, view spam/ham prediction result, check confidence score, save prediction history, search and filter records, delete history rows, view dataset information, update profile, change password, and export history as CSV or text. Admin users can manage users, view all predictions, upload datasets, train models, evaluate accuracy, precision, recall, F1 score, and view training history. This email spam detection source code is suitable for students who need a final year project, major project, minor project, source code, and project report based on Flask, SQLite, NLP, and machine learning.

Technical snapshot

Project
Email Spam Detection System Final Year Project with Source Code
Stack
MACHINE-LEARNING
Includes
Code, DB, README
License
Academic submission
Secure CCAvenue payment · Instant download · Need help? WhatsApp us

Admin Features

Modules and controls available to administrators

  • Separate admin login in this final year project
  • Admin-only access to /admin/*
  • Admin dashboard
  • View total user count
  • View global prediction statistics
  • View recent users
  • View recent predictions
  • View latest model metrics snapshot
  • View confusion matrix if model is trained
  • User management
  • List non-admin users
  • Search users by name
  • Search users by email
  • View all predictions
  • Search global prediction log
  • Filter global predictions
  • Delete inappropriate prediction rows
  • Dataset management
  • Upload CSV dataset to data/
  • Select CSV file for training
  • Train machine learning model
  • Update dataset metadata
  • View model metrics
  • View accuracy score
  • View precision score
  • View recall score
  • View F1 score
  • View confusion matrix values
  • View confusion matrix plot
  • View training history log
  • Train/test split support
  • Best model selection by F1 score
  • Saved model artifacts management through training pipeline

User Features

What end users can do in this application

  • User sign up in this final year project
  • User login and logout
  • Forgot password
  • Reset password using registered email verification
  • Secure password hashing using Werkzeug
  • Session-based user access
  • User dashboard
  • View total emails checked
  • View spam count
  • View ham count
  • View spam percentage
  • View recent predictions
  • Analyze email subject and body
  • Combine subject and body for prediction
  • Spam / Ham prediction result
  • Prediction confidence score
  • Prediction timestamp
  • Save each prediction in history
  • View prediction history
  • Search history by keyword
  • Filter records by spam
  • Filter records by ham
  • Filter all records
  • Filter history by date range
  • Delete individual prediction records
  • View per-user statistics
  • Dataset information page
  • View last registered dataset stats
  • Profile page
  • Update name and email
  • Change password with current password verification
  • Export prediction history as CSV
  • Export prediction history as plain text
  • Normal user routes protected under /app/*
  • Admin users redirected to admin console

Other Features

Additional capabilities included in the project

Machine Learning Features in this Final Year Project

  • Email spam/ham classification
  • Locally trained machine learning model
  • No third-party inference API
  • TF-IDF vectorization
  • Naive Bayes model training
  • Logistic Regression model training
  • Linear SVM model training
  • Best model saved by F1 score
  • Train/test split
  • Prediction preprocessing aligned with training preprocessing
  • NLTK stopword handling
  • NLTK tokenization
  • NLTK lemmatization
  • pandas CSV data loading
  • joblib model persistence
  • matplotlib confusion matrix plot
  • Dataset metadata tracking
  • Training metrics storage
  • Requires trained model before normal users can analyze emails
  • Model artifacts saved under:

    
     
    model_artifacts/

 

Other Features in this Final Year Project

  • Complete email spam detection source code
  • Suitable for final year project, major project, and minor project
  • Project report content can be prepared from included modules
  • Flask web application
  • SQLite database
  • Flask-SQLAlchemy ORM
  • User authentication
  • Admin authentication
  • Secure password hashing
  • Spam/ham prediction history
  • User statistics
  • Admin dataset upload
  • Admin model training
  • Model metrics display
  • Confusion matrix plot
  • CSV export support
  • Text export support
  • Kaggle dataset downloader
  • Sample dataset included
  • No external inference API required
  • Useful for viva, source code review, project report writing, and project demonstration

How to Run

Step-by-step setup on your laptop or PC

  1. Open the project folder that contains:

    
     
    run.py
    requirements.txt
  2. Create virtual environment:

    
     
    python -m venv .venv
  3. Activate virtual environment on Windows:

    
     
    .\.venv\Scripts\Activate.ps1
  4. Install dependencies:

    
     
    python -m pip install -r requirements.txt
  5. Seed the database:

    
     
    python seed.py
  6. Optional: download Kaggle dataset:

    
     
    python download_kaggle_dataset.py
  7. Start the application:

    
     
    python run.py
  8. Open project in browser:

    
     
    http://127.0.0.1:5000
  9. Open user login:

    
     
    /auth/login
  10. Open admin login:

 
/auth/admin_login

How to train the model?

  1. Start the Flask app:

    
     
    python run.py
  2. Open admin login:

    
     
    http://127.0.0.1:5000/auth/admin_login
  3. Login using admin credentials.
  4. Open Dataset & Training:

    
     
    http://127.0.0.1:5000/admin/dataset
  5. Select sample dataset:

    
     
    sample_sms_demo.csv
  6. Click:

    
     
    Train & evaluate
  7. After training, open Model Metrics to view accuracy, precision, recall, F1 score, and confusion matrix.
  8. Normal users can then use Analyze Email.

Login Credentials

Default demo accounts for testing after setup

Administrator Account

Demo User Accounts
All demo users use password:


 
Userpass1

Demo users:

User Login:
/auth/login

License

Usage terms for academic and personal projects

Related Tags

Search terms and categories for this source code

Email Spam Detection System Final Year Project with Source Code Source Code Final Year MACHINE-LEARNING Project Ready-to-Run Code With Database File Plagiarism-Free Faculty Approved final year project major project minor project source code project report email spam detection spam detection system email spam detection using machine learning Flask spam detection project Python final year project machine learning source code NLP spam classifier TF-IDF spam detection Naive Bayes project Logistic Regression project Linear SVM project spam ham classification email classifier project