The Long Goodbye: Using ChatGPT to Transition from a Two-Decade-Old Email Address

I’ve had the same personal email address for twenty years. It’s a great address that I grabbed when our service provider first started its own email service.

Last year, we were offered a special rate for home internet with a rival provider. We were in a 2 year contract, though, so we put it off, but come September 2024, we can change. And save money.

Problem is, I’d lose my email address.

I’ve been worrying about this for a couple of years, anticipating that we might get to this situation. Slowly I’ve been weaning most of my personal emails to go to one or other of my gmail accounts, but there are still a lot connected through the old one.

I figured out how to download onto my computer all emails from my old account. I had no idea what to do with these huge text files, though. Search for <…>? Import into Excel and use Text to Columns and then lookup tables to find unique results?

So I asked ChatGPT for help.

#

I’ve found ChatGPT to be good for brainstorming and for research. It can help make up names for an ice cream shop or tell me what models of SUV’s were popular in 2000 or give me some ways that screams are presented in comic books. It’s more direct than Google for finding answers to questions and doesn’t bombard you with related sites that everyone else in the world is looking at. But you do have to be careful. If you like the name for a city on the west coast that it made up, make sure that the city does in fact not exist.

When I asked Open AI how to extract unique email addresses from messages. It gave me a few options.

It also told me exactly how to do this using Python:

import os
import email

# Path to the folder containing .eml files
folder_path = ‘/path/to/eml/folder’

# Set to store unique email addresses
unique_emails = set()

# Iterate through .eml files in the folder
for filename in os.listdir(folder_path):
if filename.endswith(‘.eml’):
file_path = os.path.join(folder_path, filename)
with open(file_path, ‘r’, encoding=’utf-8′) as file:
msg = email.message_from_file(file)
# Extract sender’s email address from the “From” field
sender_email = msg.get(‘From’)
if sender_email:
unique_emails.add(sender_email)

# Output unique email addresses
for email_address in unique_emails:
print(email_address)

 

I am not a programmer. However, I am self-taught in Basic, HTML, PHP, and some SQL. I’ve written a DOS program to generate number sequences with MOD 10 check digits for work, and I created the old version of my WordPress site from a blank, but I’ve never tried to work with Python.

A few stumbles later (the first installation of Python didn’t register in System variables properly, then I misread and thought I had to run the script from within Python rather than the cmd prompt, then I realized that I needed the script to output to a text file, then I realized that the emails were in subfolders below the folder where I was running the script) I had an 11K text file with all the unique addresses in my old email account. Easy then to import into Excel and strip the names from the actual addresses using Text to Columns. Then I could manually decide which were ones where I need to change my subscription address, and which ones are people that I need to email, and which ones I plan to dump.

#

I know that GPT will state as truth things that are false, either because it doesn’t really know (I once asked for songs that start on the dominant and it gave me one that starts on the tonic. I insisted and it apologized and corrected) or, I believe that in certain circumstances where the user might be trying to do something unethical such as cheat on an essay, it intentionally misleads (searching for a conversation from “Sons and Lovers” that I could not locate, it gave me dialog that had the character’s personalities and sounded like DH Lawrence, but when I searched the Gutenberg text, it did not exist).

Some of the articles I’ve read about ChatGPT were written by programmers who were surprised how fast and accurately it solved their programming requests (A Coder Considers the Waning Days of the Craft). This was the reason that I trusted the Python script that ChatGPT gave me for my very simple needs. Plus, I could read the script and see the basics of what it was doing.

So if you are in my list still using the email address from my ISP, look for a message from me asking you to update to my gmail account. If you don’t receive one, you’ve scrolled off my history of email exchanges.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.