Re: Rookie - Import Mail mailbox
Re: Rookie - Import Mail mailbox
- Subject: Re: Rookie - Import Mail mailbox
- From: Andreas Amann <email@hidden>
- Date: Tue, 22 May 2007 17:52:53 -0700
Ylan,
tell application "Mail" to import Mail mailbox at "~/Temp/ylan.mbox"
Unfortunetly, that is where I started. Doesn't work.
Code:
tell application "Mail" to import Mail mailbox at "~/Temp/ylan.mbox"
Event Log:
tell application "Mail"
import Mail mailbox at "~/Temp/ylan.mbox"
end tell
However, nothing happens. Mail doesn't seem to do anything nor do I
get an error message. In the terminal you can see that the file is
there:
Ylans-Mac:/ ylan$ ls -al ~/Temp/ylan.mbox
-rw------- 1 ylan ylan 2510 May 22 09:21 /Users/ylan/Temp/
ylan.mbox
Ahh, this is the problem - you are trying to import a "mbox" file and
not a "Mail mailbox"!
The command assumes either a 10.4-style mbox:
ylan.mbox (a FOLDER)
/Messages (a folder within the above folder)
/1.emlx
/2.emlx (the individual messages within the Message folder, in
10.4 emlx format)
or a 10.3 style mailbox:
ylan.mbox (again, a FOLDER, not a file)
/mbox (the actual mbox file residing in the above folder - it has
to be named "mbox")
I tested both cases and they worked fine for me.
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden