Skip to content

Connect to a Yahoo Mail account via IMAP using SSL and an app password. Downloads emails and attachments and deletes from server.

Notifications You must be signed in to change notification settings

krypdoh/YahooMailDownloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

YahooMailDownloader

Connect to a Yahoo Mail account via IMAP using SSL and an app password. Downloads emails and attachments and deletes from server. Yahoo Mail Email Downloader and Archiver

Functionality:

  • Searches and downloads all emails from a specified year.
  • Saves each email as a .eml file in a year-based folder under the SAVE_DIR.
  • Extracts and saves attachments (if present) in the same folder as the email.
  • Deletes the email from the server after successful download.
  • Repeats the download process until no emails remain for the selected year.
  • Supports optional multithreaded downloading (configurable).
  • Reconnects to the server automatically on connection failures or SSL errors.

Requirements:

  • Python 3.6+
  • Yahoo app password (2FA must be enabled in Yahoo)
  • Stable internet connection

Configuration:

  • Set USERNAME and APP_PASSWORD to your Yahoo credentials.
  • Set SAVE_DIR to the directory where emails should be archived.

Usage:

  1. Run the script.
  2. Enter the year you want to archive (e.g., 2024).
  3. The script will:
    • Find all emails from that year,
    • Save them and their attachments,
    • Delete them from Yahoo Mail,
    • Repeat until no emails are left for that year.

IMPORTANT:

  • This script permanently deletes emails from your Yahoo account after saving.
  • Use with caution and verify your backups.

Author: Krypdoh Last updated: 2025.07.31

USE AT YOUR OWN RISK!! PLEASE TEST IT ON SAMPLE FOLDER OR ACCOUNT BEFORE PROCEEDING!

image image

About

Connect to a Yahoo Mail account via IMAP using SSL and an app password. Downloads emails and attachments and deletes from server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages