how to open eml file from terminal?

E

erv2

Guest
i am writing a java app, which needs to open .eml files in from the
local file system using Runtime.getRuntime.exec()

under windows, the only thing i need to do is to type in the following
in the terminal:

start foo.eml

under Mac OS X, there's a program called "open" which does a simular
job as "start" in windows, i can do " open foo.pdf ", "open foo.jpg"
which will fire up the registered program to handle the file. but "
open foo.eml" wont work, here is what happened:

2006-02-17 11:37:17.067 open[313] LSOpenFromURLSpec() returned -10814 for application (null) urls file://localhost/tmp/TempEmailFile62117.eml

"open" seems not to understand that file format. i downloaded Thunderbird for Mac, but i have no idea how to run it from terminal and give it the foo.eml" as the argument.

i am quite new to Mac OS as well, could anyone give me some hints?

thank you
 
Joined
Jan 12, 2005
Messages
1,278
Reaction score
13
Points
38
Location
/home/sheffield/UK
Your Mac's Specs
12" 1Ghz PB 768Mb 10.4.5 30Gb Video iPod 40Gb 3G iPod 1Gb iPod Shuffle
just right click on the eml file then do an open with, this will set which program you want the eml file to open with
 
OP
E

erv2

Guest
i m sorry i m a newbie.

open foo.eml didn't work because eml haven't been registered with any application. after i registered with thunderbird, "open foo.eml" fires up thunderbird.

but the problem is using the "open foo.eml" only fires up thunderbird, and bring up a "new mail" screen, not actually open the foo.eml file.

i tried to registered with Mail, Mail brings up a "new mail" screen and put the foo.eml into attachment, which is not i would expect it to do.

any tips?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top