לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

How to open a mail message (eml) from command line?

  • 2 תגובות
  • 1 has this problem
  • 27 views
  • תגובה אחרונה מאת ssosik

more options

I use offlineimap to fetch messages from my organization's mail server. This saves a copy of each mail message under a folder within my home directory.

Is it possible to open a specific mail file in Thunderbird from the command line (Mac OSX)?

I see `/Applications/Thunderbird.app/Contents/MacOS/thunderbird` has a `-file` option, but that doesn't do what I was hoping - it opens a Compose window with the file as an attachment.

Thunderbird does have the ability to properly open and display these email files if I open a given file via the "Open Saved Message" menu item under File in the UI.

Is there a CLI equivalent to the File -> Open Saved Message action?

I use offlineimap to fetch messages from my organization's mail server. This saves a copy of each mail message under a folder within my home directory. Is it possible to open a specific mail file in Thunderbird from the command line (Mac OSX)? I see `/Applications/Thunderbird.app/Contents/MacOS/thunderbird` has a `-file` option, but that doesn't do what I was hoping - it opens a Compose window with the file as an attachment. Thunderbird does have the ability to properly open and display these email files if I open a given file via the "Open Saved Message" menu item under File in the UI. Is there a CLI equivalent to the File -> Open Saved Message action?

כל התגובות (2)

more options

On Windows, you simply enter the file name at the command prompt:

C:\Users\username\foldername\message.eml

A similar method on OS X should work with the open command:

https://apple.stackexchange.com/questions/212583/how-to-open-files-via-terminal

more options

Thanks for the reply.

I had tried that, and it didn't work directly (the files don't actually end with the `.eml`) but you gave me the right idea. If I add the `.eml` extension to the files then the OS X open command does do the right thing. By default `open` uses Mail.app, but adding the `-a` switch opens the message in Thunderbird:

open -a /Applications/Thunderbird.app/ ./foo.eml

Thanks!