What: How to import any outlook file (OST and PST) into Gmail for free.
How: Using Mozilla Thunderbird as the only software you need to install.
Why: My work was hit with a massive ransomware attack and we lost pretty much everything (we did not pay ransom). For years we had to use Microsoft Outlook for email which I hated. Student accounts used gmail but all employees were stuck with Outlook. This meant that we had to export or archive our email every so often if we wanted to save old emails. I’m a bit of a data hoarder so I’ve always saved everything. Once the hack happened, Employees moved to gmail as well. I wanted to figure out a way to import all my emails (archived as well as the ones I could still access in outlook) in a single place so that all that data would finally be searchable in an easy way. I figured it out.
When the attack happened, it cut off my outlook app from the Exchange server, however I could still open it up to access my old emails. These were basically all the emails from Fall 2020 to Feb 2021. I hadn’t archived these yet, so I was hoping not to lose them.
The tool I’m using is Mozilla Thunderbird. This is a great email client that I used years ago before my current job and am glad to use it again to get the result I want.
Step 1: Find the emails from Outlook: I could no longer access the exchange server at work to get new emails, but I still could read my old emails in my outlook. It will pop up a login screen every minute or two, but you can ignore it, or just click “cancel” and it’ll go away. That doesn’t affect this process at all.
Outlook stores these in a file with an extension of .OST. You can see this file for yourself if you open outlook, go to file–>Account Settings–>Account Settings (again) then click the “Data Files” tab. You’ll see the filepath for your email address. Something like “C:\Users\Username\AppData\Local\Microsoft\Outlook\your.email@yourWork.com”
If you load any archived outlook files, you’ll see their paths as well. These have a .PST file extension.
Load Archived emails into Outlook You likely won’t need your password or anything to work to import old archived files into Outlook. Simply go to File–>Open Outlook Data File (.pst) and select the archived file. Once you import the emails, they might show up as “Archive” in the left column. You can rename this by right-clicking that name –> Data File Propertied and clicking the “Advanced” button and changing the name there. Once you exit these windows the new name show appear in the left column. I named mine based on the dates of the emails they contain. This name will follow the data into Thunderbird and then into Gmail so make it descriptive.
Test that the archives folders update with the correct name by clicking into that archive and making sure the emails are visible in there. Sometimes these files get corrupted. Sadly, you can’t just right-click that archive and see how many total emails it has because Outlook is stupid (for many reasons) and Outlook will only show you the number of emails in a specific folder you click, not and sub-folders. Look at the subfolders individually to make sure you have everything you need there. You’ll need to do this to each archive you plan to import.
Side note: this is one of the many reason I dislike Outlook. By default when you search emails in outlook it will only search the folder you are currently in, not any subfolders, or any archives… only the folder you are in… which is pretty useless.
Step 2: Setup Thunderbird to sync with the gmail account.
You have to setup gmail to allow IMAP. Here’s the instructions from google: https://support.google.com/mail/answer/7126229?visit_id=637540132586664480-1609380434&hl=en&rd=1
Next open Thunderbird and when you are setting up your account profile enter the correct data. For gmail, Authentication method is OAuth2 and the other details are in the link above.
This will sync your new gmails to thunderbird. Critically, though, this is the link to allow OLD emails to be imported into Gmail as well. We’ll set that up next:
Step 3: Import your Outlook account into Thunderbird Once you setup Thunderbird, click the hamburger icon at the top left of the mozilla window and select Tools–>Import. On the next window select to only import mail and finally on the next window click Select Outlook
Then give your computer a long time to do this Sync. I had about 6GB of emails which is quite a few. I don’ t recall how long it was, but I suggest doing it overnight.
Step 4: From Thunderbird to Gmail
Once everything is synched, go to the left pane of Thunderbird and simply drag the folder from your “Local Folders” into your gmail folder As shown.
This will then sync those emails with your gmail account. It might not look like it is doing anything, but trust me that it is uploading all those emails to your gmail account. You can even check by visiting your gmail account.
Every now and then Thunderbird wouldn’t move the folder with a drag and drop. To fix this I added a new subfolder to my gmail in Thunderbird by right-clicking and selecting “Add new subfolder” then named it whatever I liked. I then went down and clicked on the local folder that I had trouble copying. This loads all the individual emails in the top right pane of thunderbird. Go up there and click one of the emails and then Ctrl+a to select all. Now I can drag all the emails directly into the new gmail folder I created before on the left pane.
Step 5: Enjoy searching every email you’ve ever gotten using Gmail’s awesome search feature! Just login to your gmail account and all your new folders should appear there. You can click through them to make sure, but in general I find it much easier just to search. It is easier to remember what an email was about and search for it than trying to search dozens of individual archives and folders in outlook.