Everyone who is migrating to Gmail loves the google search feature for all your new mail, but wouldn’t it be nice if you could get all of your old email messages into Gmail from your Mac OS X Mail.app without forwarding the thousands of messages you’ve accumulated over the years by hand?
Mark Lyon wrote a great little PC program in python that automates importing your old email messages to your gmail account. The site instructions and the program are for Windows and work great, but what about us Mac users?
He was nice enough to include the python source code that also happens to work with Mac OS X, but for those of you that have no idea how to run python scripts, or don’t even know what python is and have no clue about mbox files, I’ve written a simple applescript that uses the terminal to automate the process for all of your mailboxes.
The script requires you to download Mark’s source code, modify a few settings and then click run to automate the process for all of your Mac OS X Mail.app mailboxes, while allowing you to exclude other mailboxes.
1. Download Mark’s script to your Desktop. Instructions Here.
2. Download my gmlAutomator AppleScript.
3. Open the script in Script Editor.
4. Modify the properties at the top of the script
5. Run the AppleScript.
Update:
Another even more simple way to accomplish this was sent to me by Ken. The process is to create a new rule in Mail.app with the action “redirect to
myaccount@gmail.com”. Have it match whatever messages
you’re interested in bouncing up to gmail, for example all of
‘em. Select the messages you’re interested in sending off and
run Message -> Apply Rules. Done!
If you leave the rule in, new (matching) messages will also get
bounced to gmail (and still preserved in Mail.app).
Kelly Friedman points out the following:
I finally got it to work (or at least it seems to be working right now, I’ll find out later).
First of all, you need the older version of the script, which doesn’t require Python Widgets. This can be downloaded here (choose the Linux version at the bottom):
http://www. marklyon .org /gmail /old /default.htm
Secondly, I use IMAP accounts, and the script doesn’t work with those. So what I did is created a folder “On my Computer” called “Gmail” and option-click-dragged all the e-mails from one folder into that mailbox.
Then, within the script, I set my path to:
property mymailboxpath : “/Users/ kerim /Library /Mail /Mailboxes/”
and I changed the following line:
else if eachMbox does not contain “.mbox” then
to
else if eachMbox does not contain “Gmail.mbox” then
That way it only works with this one folder.
I run the script. Delete all the messages, apply the appropriate Label to all the messages online in Gmail, and then I repeat the process with the next folder.
Hopefully it will work!
Thanks for the script! it worked like a champ!
Just as a follow-up, I had 40MB of mail, (978 pieces) and it took about six hours to move it all…But is was all done while I did other things thats to this script.
umm…what?
I get this message in the terminal:
*** Can’t open file or directory. Is the path correct? ***
I gave this script a shot, but it doesn’t do anything… no return codes, etc, nothing…
The paths are case sensitive. Make sure you entered your username exactly as it’s labled in your home folder. Or, just use the “mail rule” method above instead. It’s much more mac user friendly if you’re sheepish about AppleScripts.
Yeah, I did the case sensitivity stuffs… mail.app rule sounds way beter… running it now
thanks!
MUPPETS!
“I get this message in the terminal: *** Can’t open file or directory. Is the path correct? ***Ý@ÝJune 19, 2004 10:38 PM”
Well duhhh you need to *edit* the first few lines of the script.
RTFM!
“4. Modify the properties at the top of the script”
Just a note – your script assumes that you only have one account in Mail.app, or rather, assumes that Mail.app handles multiple accounts in a sane way. You pretty much have to do it by hand, if you have multiple accounts. I guess email me if you can’t figure it out.
Um. Dude. I have 7 accounts and it worked fine for me.
think the python script has been edited – download link is http://www.marklyon.org/gmail/gmlw.tar instead and the file is gmlw.py and there are some failures to load some modules in python…
the alternative method of forwarding is that old mails will not have the correct time stamp…
any suggestions? thanks.
I did both the rule and the apple script. I’m not sure which one is working, but it is! I was just about to give up, because when I ran the script, I got 4 windows, but frankly didn’t know what to do with them and then Gmail refreshed and there was the test message I sent to myself.
Thank you!
Getting an error about ‘Tkinter not running’ or something like that…
I tried the redirect idea but it looks like not all my email got to google.
Does anyone know if the count google gives is of threads or messages? If threads, how to count messages?
Thanks
Is there a way to export from Mail.app to Gmail WITHOUT losing the timestamps?
When I run the apple script, it seems to just send over the first six messages then exit properly. Unfortunatly, I am sure I have over a thousand messages. Anyway I can troubleshoot what the problem is? When running a second time, it sends over the first six messages again from the same mail account.
Help!
Primi servizi utili per Gmail
Due utility per chi utilizza Gmail: Mbox & Maildir to Gmail Loader (GML) e’ un servizio che permette di importare i messaggi email da outlook & mozilla in Gmail. Se volete essere avvisati quando ricevete una nuova email, senza dover…
Migrating email to gmail
For those of you with a new gmail account you might wanna migrate your mail over to gmail.
6/23/2004 #4
OS X Mail.app to GMail…
removed
Quantity vs. Quality: Quantity wins.
Often times people ask me where I find the shit to put up on this website day after day after fucking day. The truth is that I’m a person with far to much free time on his hands. I have…
Quantity vs. Quality: Quantity wins.
Often times people ask me where I find the shit to put up on this website day after day after fucking day. The truth is that I’m a person with far to much free time on his hands. I have…
Quantity vs. Quality: Quantity wins.
Often times people ask me where I find the shit to put up on this website day after day after fucking day. The truth is that I’m a person with far to much free time on his hands. I have…
AppleScripts and GML
This page explains how to use the GML tool below in conjuction with an AppleScript to import all of your MacOS X Mail.app mailboxes. There is also a handy reference to writing a simple Mail.app script to forward all of your messages to GMail. Operating…
Import Mail from Mac OS X into Gmail
Everyone who is migrating to Gmail loves the google search feature for all your new mail, but wouldn’t it be nice if you could get all of your old email messages into Gmail from your Mac OS X Mail.app without forwarding the thousands of messages …
Webcrumbs du Jour
Time to clean up my bookmarks… I mean, webcrumbs. Here’s a list of random links I’ve been saving for a…
Import Mail from Mac OS X into Gmail
Everyone who is migrating to Gmail loves the google search feature for all your new mail, but wouldn’t it be nice if you could get all of your old email messages into Gmail from your Mac OS X Mail.app without…
You Guys Rock!!!!!! Works like a champ.
this works pretty well if you download mark lyon’s 0.4 version. However, the timestamp that you see in your gmail inbox will always be the date gmail received it; if you open the message, you get the correct date. This goes for both the python script as using the filters in apple’s mail.app. So just go with that if you’re not into the techy stuff!
Hello all…I am a retarded…this is all way over my head.
I am running Tiger on a Powerbook G4. My old mail client is entourage. How do I set this program up to run with those parameters? If someone would be so kind as to give me a more or less step by step guide as to how to do this…that would be unbelievable.
Much appreciated,
-b
I just transferred my emails from Entourage and at many points I didn’t think it was going to be possible. I changed email hosts and had little data to “pop”. It was all on my machine.
I found a way to do it, different from yours, but it worked well and I want to get the word out.
Hoping for link to the how to…so others don’t have to waste 20 hours figuring out how to do this.
Thanks,
–Mike
http://mikestask.googlepages.com
very interesting, but I don’t agree with you
Idetrorce
I know that this was published a long time ago, but it’s still in use! I’m in the process of migrating 6 months of work email to gmail and am breathing a sigh of relief! Thanks!!