Like so many other people, I’ve switched my personal email use over to Gmail. In fact, I did it back in mid-2005, redirecting my personal address on my private fosketts.net domain from Dreamhost’s POP mail service to my gmail account. I’ve been happy with it ever since, but my old mail still sat on my old desktop PC in a PST file created by Microsoft Outlook.
I love that Gmail keeps all of my email online and easily searchable – when I need to locate some old bit of information, I can usually find it by typing a couple of words into the Gmail search box, no matter where I am. Since I travel a lot, I’ll often log into Gmail from my work laptop, a hotel PC, or my iPhone just for this purpose.
But the other day, I remembered a message my dad sent me a few years ago and wanted to look it up. I was stuck, though, because the message was sitting in a PST on my (powered-off) desktop back at home. I was able to get to it from my laptop through a complicated process that involved ssh, my Tomato-powered router, wake-on-LAN, and remote desktop… Not something I wanted to go through again!
I got thinking that I’d love to have all of my mail in Gmail – even those messages from before I started using it. Turns out, lots of people were thinking about this way back when, but it’s always been difficult to import mail into Gmail, and lots of folks think it still is. But I found that, thanks to Gmail’s new IMAP feature, it’s now super easy to get your PST (and Thunderbird, etc) mail into Gmail! Read on for how I did it, and how you can too!
It used to be pretty difficult to get messages into Gmail, and most solutions revolved around re-mailing old messages to your new Gmail account, or having Gmail access a POP server and import messages for you. Neither of these effectively solved the problem of mail stored in Outlook PST files, though. If you had a PST, you needed to extract them into a standard format and (try to) use a Gmail mailer like GML to import them. This may work for you, but it didn’t work for me and I don’t suggest it.
The new (functional) method I used simply uses Outlook to move messages in bulk over an IMAP connection. IMAP lets the Outlook directly access folders on a remote mail server for drag and drop mail operations, and this is the functionality we’re leveraging with Gmail.
Gmail doesn’t have folders, of course, but it spoofs them with labels. So when you access a Gmail account with an IMAP server, your labels show up as folders, and when you drop a message into one of these “folders”, it simply gets that label in Gmail. Note that it does not get an “Inbox” label, however, so you won’t see the message in the Inbox, only when you click on the label or search with the search box. But this works pretty well, and allows you to neatly label old messages as being non-Gmail, which might be helpful.
So let’s say you’re using some version of Outlook (or Outlook Express). Here’s what to do:
- Enable IMAP in your Gmail account settings
- Configure Outlook to access Gmail per Google’s directions
- Once you connect to Gmail’s IMAP, you should see all of your labels show up as folders – this is key!
- In your Gmail account, create a new label for your migrated email – I called it “Old Mail”, clever eh?
- Now just select all of the messages in each PST folder (control-A is your friend) and drag and drop them on the folder/label you just created
- Moving messages takes a while – I let it run while I had dinner and found about 2000 messages moved over when I returned
You have now migrated your email to Gmail! Here are a few gotchas I noticed:
- As I mentioned above, the messages will not show up in the Inbox, but can be accessed by clicking on the label or through the search box Update: After a few days, my Gmail inbox does now include all of my “Old Mail”, even those without the “Inbox” label. Weird.
- Native messages from or to an exchange account also configured in Outlook show up as “Unknown sender” and “No subject” because Gmail can’t figure out their headers. The data is there, and it’s searchable, but not all that readable.
- Gmail de-duplicates messages rather effectively – drag the same message in 12 times and it only shows up once! This is very cool, but can be frustrating if you trash a message and then try to copy it in again, as I did while trying to figure this all out! If it’s in Gmail’s trash, it will never show up in the desired folder!
- For some reason, my iPhone (which uses IMAP to connect) immediately downloaded all the old messages I just copied into my Inbox, bumping my real new mail from its list even though it supposedly sorts by date… So suddenly the top unread messages in my iPhone inbox were dated from 2001 and earlier! Pretty funny, really, but not at all as expected. Mail without the Inbox label (dragged to another folder/label) does not exhibit this problem, though.
Good luck with this, and I hope it helps! By the way, a similar process helped me migrate my even-older mail through Thunderbird…
Update: After others have tried this method, they have reported that Gmail is sorting the messages wrong in the main Inbox list – sorting by date of import rather than date of receipt. I have no such problem, though Gmail did apparently rescan my “Old Mail” messages and add them to my Inbox at some point over the last few days. So maybe you have to wait a while? Also, I wanted to note that I did my import using Outlook 2002, so maybe there are weird effects of using other Outlook versions…
louismg says
Ryan Tate praises your solution:
GMail PST import solution!
http://thehack.webmasher.com/2007/11/gmail-pst-import-solution.html
From now on, we come to you first! 🙂
louismg says
Ryan Tate praises your solution:
GMail PST import solution!
http://thehack.webmasher.com/2007/11/gmail-pst-import-solution.html
From now on, we come to you first! 🙂
Crazy8s says
Hallelujah! Praise the lord! This article was my salvation. I’m leaving my job tomorrow, and wanted to transfer my personal emails to gmail. Not only did this work like a charm (and was WAY simpler than other work-arounds — I found this one by limiting Google search to previous six months only), I was able to move only the few folders I wanted. And I could do this all myself without asking my Ph.D. engineering professor husband. Thank you!
Crazy8s says
One more note: Be very careful not to delete any imap.gmail.com folders in Outlook as you’re transferring. Copy the emails instead of moving them. Or give the new folder a different name on gmail so you can tell them apart.
I moved some mail from an Outlook folder over to imap.gmail.com. I gave the new folder the same name as the old one. I got distracted for a few minutes. Then, I came back to Outlook and deleted the folder, thinking I was deleting the old, now-empty Outlook version. Instead, I was deleting the new folder on imap.gmail, along with all the mail. There is no way to recover or undo this, at least that I could find. It’s just gone. Luckily, it was not terribly important stuff.
Crazy8s says
Hallelujah! Praise the lord! This article was my salvation. I’m leaving my job tomorrow, and wanted to transfer my personal emails to gmail. Not only did this work like a charm (and was WAY simpler than other work-arounds — I found this one by limiting Google search to previous six months only), I was able to move only the few folders I wanted. And I could do this all myself without asking my Ph.D. engineering professor husband. Thank you!
Crazy8s says
One more note: Be very careful not to delete any imap.gmail.com folders in Outlook as you’re transferring. Copy the emails instead of moving them. Or give the new folder a different name on gmail so you can tell them apart.
I moved some mail from an Outlook folder over to imap.gmail.com. I gave the new folder the same name as the old one. I got distracted for a few minutes. Then, I came back to Outlook and deleted the folder, thinking I was deleting the old, now-empty Outlook version. Instead, I was deleting the new folder on imap.gmail, along with all the mail. There is no way to recover or undo this, at least that I could find. It’s just gone. Luckily, it was not terribly important stuff.
Richard says
Great work! Haven’t tested for all the masses of emails I want to transfer but what I like is it even seems to work properly for sub”folders” (creating sublabels) when you do it.
Also looking forward to deletion of duplicates as I have a lot – I backed up at various different times and I think there’s a lot of overlap.
Richard says
Great work! Haven't tested for all the masses of emails I want to transfer but what I like is it even seems to work properly for sub”folders” (creating sublabels) when you do it.
Also looking forward to deletion of duplicates as I have a lot – I backed up at various different times and I think there's a lot of overlap.
Petes says
After a little bit of procrastination and stumbling around with other options that were suggested by Google, I finally got around to transferring my email from various sources to Gmail. I can sleep soundly at night now knowing that all my data is safely stored on reliable servers rather than my puny hard drive, and in one email account.
Although the article was written a while back, it is still effective and it saved the day. All the emails transferred over without any modifications in date received, mailing list info, etc.
tj says
can a iPhone sync with specific folders using activesync?
del_piero says
I came across to program which works with mails-recover outlook express mail,it is free as far as I know,also tool helped me many times,it compatible with all currently supported versions of Outlook Express and Microsoft Windows,keeps your mailbox in many files of dbx format, but, it does not split messages from attached documents,can work with very large files of dbx format and process them in a batch mode,will see the list of files, that are a part of your mailbox,process of email recovery in Outlook Express represents the recovery of corresponding files with dbx extension.
Withtu says
amazing tip! I am doing this migration! Over 8,000+ messges, oh my gosh….