This is now so simple, it shouldn’t even require any guidance… but first things first.

Why would you want to import all your old email to Gmail? Because it gives you an All-In-One, searchable archive. I know there is real demand for this: my blog visitor log tells me, since my old post on the subject, How to Import All Your Archive Email Into Gmail still receives a good 5-600 readers every single day. That means:

  • people do want to migrate to web-based software (Gmail)
  • they don’t want to lose their historical “baggage”
  • so far it has been rather complicated

Now that Gmail supports the IMAP protocol, everything’s changed. My most-popular-ever post is all of a sudden obsolete. Forget all the “Gmail-loader” tools on the Net, most of them did not work anyway, forget even my multi-step process… I’ll show you all you have to do now. I’ve tested these steps with Outlook, but they should work with Thunderbird or whatever your favorite desktop email software is.

  • Enable IMAP in your Gmail account
  • Setup the Gmail account in your client software, based on these instructions
  • This will create a folder structure matching your Gmail labels
  • Open your old archive.pst files, if any
  • Drag-and drop all your old email into the Inbox folder in your new IMAP account.
    • You can do this across accounts, or even archive files.
    • If you don’t want to “move” old email out of the archives, use “copy” instead.
    • Instead of Inbox, you can drop old email into any other Folder (create new ones if you like), to match the Gmail labels
  • Drag-and drop all your old “Sent mail” into the “Sent Mail” folder in your new IMAP account.
  • Wait patiently - with thousands of emails (my archive goes back to 1996) your upload bandwidth may be the bottleneck.

Voila! Your email is now up in Gmail, all labeled, searchable, with original sender info and dates intact (this was a problem with previous methods).

Happy Gmail-ing smile_regular

Related posts: Official Google Blog, Google Blogoscoped, Google Operating System, Official Gmail Blog, Between the Lines, Andy Beal’s Marketing Pilgrim, Search Engine Land, CNET News.com, Engadget Mobile, Compiler, TechBlog, Tom Raftery’s Social Media, TechCrunch, jkOnTheRun, Googlified, blognation and GottaBeMobile.com

Tags: , , , , , , , , , ,



68 Comments to “Simplified Guide to Importing All Your Archive Email Into Gmail”

  1. Voyagerfan5761 | October 24th, 2007 at 10:42 am

    Good work, Mr. Erdos! You beat me to coming up with this trick on my own blog!

  2. Kula bácsi | October 24th, 2007 at 11:46 am

    What if I have subfolders in my local Sent folder?

  3. Ben Kepes | October 24th, 2007 at 4:49 pm

    All they need now is native multiple signatures with auto signaturing based on send from address chosen

    If they had that I’d switch….

  4. GMail and IMAP… « business, strategy, governance | October 24th, 2007 at 4:51 pm

    [...] Gmail now supports IMAP - so for those of you who wants to change to a web only email solutions here is a list of instructions for getting your old mail out of your existing client and into [...]

  5. Voyagerfan5761 | October 24th, 2007 at 5:59 pm

    @Ben Kepes: Multiple signatures would be very nice. Heck, HTML signatures (without resorting to Greasemonkey hacks) would be nice…

  6. Ben Kepes | October 25th, 2007 at 1:23 am

    and how do I enable imap in gmail (dumb question I know!)

  7. Anders Buch-Jepsen | October 25th, 2007 at 9:05 am

    Thank’s for your useful guide. However, it seems not everyone has IMAP access yet. Google writes:

    “We’re working hard to roll out IMAP access to all our users, but it’ll take about a week…You’ll know that IMAP is available in your account when the Forwarding and POP tab in your settings becomes Forwarding and POP/IMAP.”

  8. Karl Jackson | October 26th, 2007 at 5:43 am

    Great post! I started this import last night before reading your post, knowing that there were probably a million other people doing the same thing.
    One lesson learned from my end: rather than moving the folders, copy them. Moving them will create problems when (inevitably) the server looses its connection and you have to start over. Problems in the upload will also leave you with partial folders. Alternatively, do the process incrementally.

  9. Voyagerfan5761 | October 27th, 2007 at 9:55 am

    Great tips Karl! Importing one folder at a time is probably the way to go. Now as soon as Google gives me my IMAP, I’ll start importing. Probably one folder a day.

  10. Scipio | October 28th, 2007 at 7:01 pm

    This certainly makes things much easier. I am having one problem though: when I copy my messages to the sent messages folder in Gmail, in the web interface, the recipient of the messages shows up as “me” rather than the name of the person that the message was originally sent to. Anybody else having this problem? Any thoughts on how to solve it? Thanks.

  11. Chuck Kahn | November 1st, 2007 at 5:25 pm

    Better to copy emails to the “All Mail” folder than to the Inbox. I’ve read them all anyways, so no need to clutter my inbox.

  12. Ben Kepes | November 1st, 2007 at 7:31 pm

    Question for Zoli or anyone else - when I compose mail in outlook 2007 it sits in the outbox of my personal folder. The only way I can get it to send is to move it to the drafts folder of my imap and then go into gmail online and click on drafts and send it - how do I make email automatically send through IMAP (and yes the only acount I have set up n outlook is my imap one) any clues>>>>>

  13. TIRED!!! « dinyar’s blog | November 1st, 2007 at 9:50 pm

    [...] that often.. ), but I’m still very excited about that. I’ve already tried to copy my old sent mail from my former account, but so far I’ve had problems authenticating. I think it’s got something to do with [...]

  14. Karl Jackson | November 2nd, 2007 at 4:55 am

    Ben: Google left out a setup step in their directions for Outlook 2007. In the Account Settings, I had to turn on “My outgoing server (SMTP) requires authentication”, and set it to log on using your normal username (name@gmail.com) and password. Worked for me anyway.

  15. Pavel Sokolovsky | November 3rd, 2007 at 10:12 pm

    Thanks for the great post!

    Pavel

  16. fromdtod | November 4th, 2007 at 11:04 am

    I noticed that it is possible to enable IMAP only in certain languages. If my language in gmail was set to hungarian, simple there was no menu to switch it on. But in english language of course it was there…

  17. Sebastien | November 7th, 2007 at 12:27 am

    Here is the tricky question!

    I am using thunderbird in POp with gmail - and want to switch to imap. I have TONS, tons of folder, sub folder … all neatly organized.

    1/do you know if by drag and dropping my folder, gmail will automatically create a label for online ?

    2/ what happen to the mail in the folders ? they will doubled up in gmail ? (i chose the option of keeping my mail online while using pop -we never know!)

    Sebastien

  18. Calle | November 10th, 2007 at 8:12 am

    Is there any way I can move my “Sent” messages from Yahoo! Mail (free) into the “Sent” folder at Gmail?

  19. Nick | November 13th, 2007 at 10:44 am

    Hmmm, will the new IMAP functionality allow me to transfer an old Gmail account to my new Google Apps account?

  20. Zoli Erdos | November 13th, 2007 at 10:50 am

    I simply used Gmail’s Mail Fetcher for that. Some people report Mail Fetcher does not allow Gmail accounts to be the source, but I haven’t experienced that.

    I guess if you can’t set Mail Fetcher up, you could always use the IMAP trick, basically making an offline email client the middleware.

  21. Nick | November 13th, 2007 at 10:56 am

    great idea about using the offline email client in the middle between my Gmail and Google Apps account. I think IMAP will let me keep the original dates on my Gmail mails that I move over. I was told that Mail Fetcher doesn’t keep the original dates on mails that are moved.

  22. Zoli Erdos | November 13th, 2007 at 10:59 am

    Mail Fetcher *does* keep the original dates, but label information would be lost that way.

  23. onedem | November 13th, 2007 at 9:16 pm

    Now I’d like to use Gmail’s spam filter to process my “All Mails” (or “historical baggage” :) ) again…

  24. Nick | November 17th, 2007 at 11:27 am

    I just transferred my mail from my Google Apps account to a Gmail account (I wanted to use the new Gmail features!). You were write, Mail Fetcher would keep the dates but I would lose all labels that I put on manually. But by setting up both accounts in IMAP, and dragging mail from one account to the other, I was able to keep all the labeling intact. Very nice!

  25. wendy nicholds | November 20th, 2007 at 7:08 pm

    I have an account with Gmail my hard drive crashed and now I am accessing my acct through the internet. I would like to transfer and set up my account on our lap top.
    I am nervous about the transfer and how to go about it.
    lost in gmail and picassa.
    Wendolyn Nicholds

  26. Dave | November 23rd, 2007 at 3:07 am

    The IMAP import into Gmail works really well apart from some emails that were originally received through MS Exchange and then exported as .PST and imported into Thunderbird.

    Those appear in Gmail with subject “(no subject)” and from “(unknown sender)”. When they’re opened, the content is there but is prefixed with the entire mail headers beginning with “Microsoft Mail Internet Headers Version 2.0″.

    The emails all show up correctly again in Thunderbird if they’re copied back off Gmail over IMAP. So I guess it’s a problem with Gmail.

    Anyone else seen this?

  27. Gil | November 26th, 2007 at 9:31 am

    I don’t know about anyone else here - but I am unable to do this. whenever I try copying my 500mb folder structure from outlook into gmail via imap, my outlook crashes,

    Any suggestions?

  28. Ben Kepes | November 26th, 2007 at 9:56 am

    Gil- do it a few folders at a time and you should be fine

  29. Gil | November 26th, 2007 at 10:16 am

    Doing that, and its marginally working - this is quite the pain. But I guess its worth it in the long run.

    Thanks for the help
    -Gil

  30. Ben Kepes | November 26th, 2007 at 10:24 am

    I’ve got around 12000 emails an it took a day or so. I’m at the moment getting all my mail from one gmail account to another - that looks like it’s going to take a week or so!

  31. Importing Mail from Outlook to Gmail « Butterfly Gail | November 27th, 2007 at 6:20 am

    [...] but that didn’t work.  Now I found a great explanation and it worked!!  Here’s the blog that explains [...]

  32. James Taylor | November 27th, 2007 at 9:31 am

    Wow - worked perfectly. Thanks a bunch!

  33. Michael | December 2nd, 2007 at 4:29 pm

    Does this work for AOL too? Where do I find these folders in my AOL? Could you write hits instruction in the simplest terms, assuming that I know nothing (almost true) but have a brain, so will learn!

  34. Jeff | December 3rd, 2007 at 6:01 pm

    I tried set up IMAP in Vista Winmail and the result was that one new folder showed up “gmail” below my local folders.

    Not able to see any labels and was not able to drag and drop any emails to this new folder.

    Any suggestions?

  35. Moving mail from Outlook to Gmail « verb. sap. | December 5th, 2007 at 4:45 pm

    [...] I found lots of suggestions on the web, but not much that was too useful until I ran across a blog entry from Zoli Erdos which told me exactly what I needed to know.  The key point is that Gmail, as of [...]

  36. Ted | December 8th, 2007 at 8:26 am

    Nice, but dropped mail from archive folders, show up under a new timestamp when reading gmail online…

  37. camd | December 9th, 2007 at 5:53 pm

    It looks like it sort of worked… I keep getting errors from Mail.app saying it cannot upload, and Gmail keeps crashing (preventing me from accessing my email). Is there any way to confirm that emails have transferred? Right now I have some emails transferred, but I have no way of knowing how many. The imap transfer idea seems right, but it doesn’t appear to actually work very well.

  38. Bruce | December 31st, 2007 at 11:49 pm

    When I follow the procedure of dragging and dropping the email folders into the imap account folder in Outlook, and then click on the transferred email folder, the contents of the folder momentarily appear and then disappear permanently. The folder (label) shows up in my Gmail account, but also with no contents. Sometimes, however, with some folders, the contents remain, but most have this problem. Any ideas?

  39. Rondracur | January 12th, 2008 at 4:42 am

    I also tried to upload my emails from Thunderbird (2.0.0.9, Linux) to Gmail by creating an IMAP account. The copy process works without any error message - but not all messages of a folder are copied. And I don’t see any rule behind which one is copied and which one not. So at the end I have the whole folder structure of Thunderbird in Gmail now, but instead of around 200 MB emails I only have around 70 MB. Every help is appreciated!

  40. Drew | January 17th, 2008 at 12:19 pm

    @Rondracur

    when you import mail into gmail it will collapse messages into “conversations”. So if you had a back-and-forth with someone that created 10 messages and you imported it into gmail it may only count as one. This may or may not be why your count is off, just something to check.

  41. Kelvin | January 23rd, 2008 at 12:12 am

    OMG…is this good or what!!! I never know GMAIL support IMAP till I read this. And this have been fantastic! Now I don’t have to refer to 2 places for all my emails. GMAIL rocks! And thank you!

  42. Home Of Tong | January 23rd, 2008 at 9:42 pm

    [...] Detailed instructions from where I got my help can be found on Zoli’s Blog. [...]

  43. Min | January 24th, 2008 at 5:47 am

    This was so helpful and everything worked like a charm. For those of you wishing to transfer old mail from Eudora to Gmail (instructions not currently listed on Gmail’s “supported IMAP client” page) here’s what to do:

    Set up a personality for your gmail account with these details:
    SMTP Server: SMTP.gmail.com
    Check the “Authentication Allowed” box
    Check the “Use Submission Port (587)” box
    Select “Required, Alternate Port”
    Incoming Mail: imap.gmail.com:993
    Check the “IMAP” box
    Select “Required, Alternate Port”

  44. Rondracur | January 24th, 2008 at 6:44 am

    @Drew: Thanks a lot! That for sure I had in mind.
    @all: So meanwhile I found three other reasons:
    1. If you used Gmail via pop3 before switching to IMAP and deleted an email and now you want to upload exactly this email with a special label it won’t show up with this label/in the subfolder IF the deleted email is STILL in the Trash! So before uploading empty your trash!
    2. Some subjects of emails are causing problems so the won’t be uploaded
    3. The upload connection to Gmail breaks down after a punch of emails. At the beginning you can upload a few hundreds but after a while less and less … at the end only a few at the same time. -> Take a break and come back later/ another day.

  45. robert | January 26th, 2008 at 8:33 am

    This works great for using Gmail as an archive, but in real-time there is still a problem I’ve encountered.

    I am using an MS Exchange server with Outlook 2003 as the client with a “redirect all mail to ‘my secret Gmail’ address” rule on all messages.

    If Chris sends an e-mail to me and to Ed and copies Diana, Gmail only shows Chris as the sender and “my secret Gmail” address as the recipient. So even if I do “Reply to all” in Gmail, I only respond to Chris. Worse yet, I can’t even see in the header of the e-mail that Chris sent it to someone other than me.

    I’ve found various add-ins for Exchange that address this, but they all seem to install on the Outlook client and require it to be running in order to work.

    Anyone know how to get this working in Outlook 2003/Exchange based on server-side rules? Thanks.

  46. Zoli Erdos | January 26th, 2008 at 9:13 am

    I don’t know Exchange at all, but am really surprised, so far cases of forwarding I’ve seen show the original addressees, and the forwarding address (your secret account) does not become the adressee at all.

    Hopefully some of the readers can jump in…

  47. 秦锋 | February 8th, 2008 at 5:40 am

    Do you know how to process if got “One or more parameter values are not valid”?

  48. felix | February 25th, 2008 at 3:35 pm

    in my case the time stamp shown in the inbox (right of the snippet) is the date i uploaded the mail with IMAP. nevertheless, the opened email shows the correct date, when it was received. unfortunately, this date is used for sorting the mail, as well as for searches in the mail…

    anyone any ideas?

  49. Robert Judge | February 26th, 2008 at 1:18 pm

    I’m sorry, but I don’t follow this completely. By the instruction, “Drag and Drop all your old email into the Inbox folder in your new IMAP account,” just what do you mean? How do I do that?

    Do I open Outlook 2003 and then open some other PST file rather than “Outlook.PST”? Which PST do I open, “Archive.PST” Can’t I just copy the contents of Outlook.PST to GMAIL? Just how do I do that? Perhaps an explicit step by step process would help me. Thanks.

  50. Brad | February 27th, 2008 at 7:11 am

    I’m having the same problem as Robert re: how to drag and drop into my IMAP account. I’ve been fumbling around, trying to login to imap.gmail.com using FireFTP, but haven’t had any success.

    In case there’s a better way, let me summarize what I’m trying to do. I just installed Office 2007 yesterday (new computer) and setup Outlook to access gmail but I must have set it up to use POP instead of IMAP because when Outlook downloaded my e-mails it deleted gmail’s copy. I want to be able to access my e-mails via Google’s web interface so now I’m trying to move the messages back to gmail. Any ideas? Thanks in advance.

  51. Ari | March 3rd, 2008 at 10:27 pm

    Hi.

    I have similar problems than Rondracur (January 12th, 2008 at 4:42 am).

    “I also tried to upload my emails from Thunderbird (2.0.0.9, Linux) to Gmail by creating an IMAP account. The copy process works without any error message - but not all messages of a folder are copied. And I don’t see any rule behind which one is copied and which one not. So at the end I have the whole folder structure of Thunderbird in Gmail now, but instead of around 200 MB emails I only have around 70 MB. Every help is appreciated!”

    I don’t know how to verify how many messages are seen as conversations (actually I don’t know how the “one conversation is one to many messages” should be seen through IMAP).

    I would have migrated my own domain to gmail, but due to these problems.. well.. I cannot migrate if I cannot be 100% sure all mail really is copied to gmail. :-/

  52. Importing Outlook into Gmail | Keener Living | March 20th, 2008 at 4:01 am

    [...] complete process is described in Zoli Erdos’ extremely well-written how-to. I just embellish it a little bit here, and add some pictures to further clarify the [...]

  53. Jon D | March 20th, 2008 at 6:36 am

    Felix

    I had the same timestamp problem - it seems to be client dependent.

    Kontact gave me the problem.
    Evolution didn’t work at all (probably my setup)
    Kmail works perfectly (which is weird because its otherwise v similar to kontact)

    Hope this helps and good luck

  54. Jon D | March 20th, 2008 at 6:39 am

    CORRECTION ***
    Kmail has the same problem - it looks OK, but googlemail show the upload date.

    I am about to try thunderbid. Anybody else got any cleints they know avoids the problem?

  55. Jon D | March 20th, 2008 at 7:41 am

    *** FIXED **

    Felix

    Thunderbird seems to work OK with date stamps

  56. Alpha | March 22nd, 2008 at 9:32 am

    Great post - thanks!

    I transferred my Outlook 2002 mail to Gmail and all worked fine…. except for one big problem. All Hebrew e-mails in Hebrew that I transfer from Outlook to Gmail show up in giberish.

    Gmail in Hebrew works fine, but Hebrew e-mails transferred from Outlook are unreadable.

    Any help will be appreciated.

    Thanks.

  57. tobi | April 9th, 2008 at 10:12 pm

    workes fine so far dropping mails into the Inbox. Thanks!
    (using outlook 2003)

    problem though: there is just this imap-Inbox Folder showing up in outlook. No “Sent”-Folder whatsoever. Also, i can not move, copy, or create FOLDERS on the imap-account.

    anyone knows why?

  58. Andy | April 15th, 2008 at 3:50 pm

    Thanks for the article. I am trying to import my old email folders in entourage into gmail. It uploads fine, but the original date & time of the email are lost and replaced by the import time into gmail. Is there anything I can do about it?

  59. gmail imap | April 16th, 2008 at 2:08 pm

    [...] the Messaging menu, choose New E-mail Account.http://itmanagement.earthweb.com/article.php/3737196How to Get Your Gigabytes of Offline Email into Gmail!If you’re like me, you’ve wanted to leave behind Outlook or Firefox and transition to gmail for [...]

  60. gmail account | April 17th, 2008 at 6:59 pm

    [...] of your massive email archive. My 2GB of email over 4 accounts was the only thing holding me back. Ghttp://www.zoliblog.com/2007/10/24/simplified-guide-to-importing-all-your-archive-email-into-gmail/Google Account Multi-Login ?? Userscripts.orgSwitching from my gmail account to my non-gmail account [...]

  61. Wayne | April 23rd, 2008 at 12:10 am

    I recently switched from Yahoo Mail. Is there any way that I can import all of my old Yahoo emails?

  62. TeNTiRuJo | April 24th, 2008 at 11:52 pm

    I’ve used this way to unify my two gmail accounts, but i’ve had some problems. Some mails didn’t copy, an estrange error occurred (with ThunderBird, it says “failed to copy/move message”). But this is not the most important, cause i can’t, anyway (pop or imap), move near 400 mails with a specific label, between two dates (other mail within these dates were moved without problems). Any idea?

  63. Moving more mail into Gmail « verb. sap. | April 25th, 2008 at 6:12 pm

    [...] moving mail from the Entourage 2004 mailbox on my wife’s Mac into GMail, using the technique written up by Zoli Erdos - configuring an IMAP connection to Gmail, and mapping local folders to Gmail [...]

  64. email archive | April 26th, 2008 at 1:14 pm

    [...] of your massive email archive. My 2GB of email over 4 accounts was the only thing holding me back. Ghttp://www.zoliblog.com/2007/10/24/simplified-guide-to-importing-all-your-archive-email-into-gmail/White House Has No Comprehensive E-Mail Archive - washingtonpost.comJan 22, 2008 … For years, the [...]

  65. Random Tangent | April 27th, 2008 at 6:24 am

    [...] to make. Do I move all 2.1GB of e-mail archives off my laptop, out of my direct control, and into the cloud? Some people have done that and are happy with it. Others didn’t have such a great time. [...]

  66. Sam | April 27th, 2008 at 4:38 pm

    I have the same problem as Ari and Rondracur. There appears to be no way to be sure that all your email has been copied over. If you don’t mind losing 5% of your emails, then it is okay. But for me, that is unacceptable.

    Do this at your own risk!!!

  67. Sam | April 27th, 2008 at 4:43 pm

    I have confirmed that it does in fact lose messages; it is not just that gmail counts differently or consolidates messages into conversations.

    This seems like a serious mistake.

  68. tpullano | May 7th, 2008 at 6:01 am

    For Wayne above and others moving from Yahoo (free or paid) to Gmail, I was able to import all my yahoo mail in gmail with dates, header info, etc. all in tack.

    Did this using Gmail IMAP, Thunderbird, and YPOPs (google it!). This will import all your folders (I did it one at a time, configuring YPOPs each time for each folder).

    Within TB, I created an account for my Yahoo pop download, and the IMAP for Gmail per Zoli’s second bullet. IMAP created the full label structure from my gmail in TB (now I have a gmail backup too!). Downloaded each folder to TB from Yahoo using YPOPs, then moved the emails to the appropriate gmail label (folder) in TB, then synced it up to gmail. If a label didn’t existing, I created in TB and it would replicate in gmail!

    Email me at the name above “at gmail dot com” for specifics if you’d like.

Leave a Comment