Spam Mail

Introduction

The Spam Mail project is my very first programming endeavor, created using Python. Although I have always been passionate about computers, I only began learning to code during my preparatory classes. This project emerged from a mix of curiosity, a unique context (the COVID lockdowns), and a desire to prank a classmate while practicing my coding skills.

At the time, email communication was a primary method of interaction with teachers and classmates. This inspired me to develop a script to automatically send multiple emails to a friend, aiming to be playful rather than malicious.

Objective and Initial Thoughts

The goal of the project was to spam an inbox in a humorous way while overcoming advanced email spam filters. After research, I identified three main criteria triggering these filters :

  1. Consistent intervals between emails : Emails sent at fixed intervals are quickly flagged as spam.

  2. Identical content : Emails with repetitive text are also classified as spam.

  3. High volume from the same sender address : Sending too many emails from one address is closely monitored.

To address these challenges, I implemented solutions :

  • Random delays : I used Python's time library to generate variable intervals between email sends.

  • Unique email content : The subject and body of each email were built using random words from a dictionary file.

  • Limited reach : I accepted that the prank would stop after about 20 emails to avoid creating multiple sender addresses or escalating the effort.

Implementation and Workflow

The script is written in Python and uses the smtplib library to send emails through an SMTP server. Here’s an overview of how it works :

  1. User Input :

    • The user provides the recipient’s email address.

    • The user specifies the number of emails to be sent.

  2. Random Content Generation :

    • A random subject line is created by selecting a random number of words from a text file.

    • The email body is similarly constructed using random words from the same file.

  3. Email Sending Process :

    • The script waits for a random delay between 15 and 60 seconds before sending each email.

    • It connects to the SMTP server, sends the email, and then disconnects.

  4. This process repeats until all specified emails have been sent.

Unfortunately, this project is no longer functional due to updated security policies, particularly Gmail's mandatory two-factor authentication for SMTP access.

Ethical Considerations

Though this project was a lighthearted prank among friends, it raises ethical concerns. I want to emphasize:

  • No Code Sharing : The code will not be published to prevent misuse.

  • No Malicious Intentions : I strongly discourage using such scripts to harm or inconvenience anyone.

  • Educational Purpose : This project was purely for learning and friendly fun within a specific context.

Why This Project Matters to Me

This project represents the starting point of my programming journey. It helped me overcome initial fears about coding complexity and showcased the vast possibilities of programming. Even though the script is now obsolete, it remains a memorable milestone in my learning path.