Ability to import/save e-mail messages from .eml text files to folders (Message|Copy)

RESOLVED FIXED in Thunderbird 11.0

Status

Thunderbird
Message Reader UI
--
enhancement
RESOLVED FIXED
15 years ago
6 years ago

People

(Reporter: Max Alekseyev, Assigned: squib)

Tracking

(Blocks: 1 bug)

Trunk
Thunderbird 11.0
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

15 years ago
Mozilla can easily save selected messages to .eml text file. But there is no way
to perform opposite operation, i.e. import e-mail messages from .eml file. 
Such operation would be especially useful for transporting e-mail messages from
different Mozilla installations...

Updated

15 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 1

15 years ago
I would also find this useful, because I've forwarded some messages to myself as
.eml attachments from old accounts. I can get at them in their forwarded form
but it's no substitute for having the original senders, dates, etc.

Comment 2

14 years ago
Bug seems to be similar to 171907
*** Bug 209236 has been marked as a duplicate of this bug. ***
*** Bug 209610 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

14 years ago
Blocks: 171907

Comment 5

14 years ago
I need it too. Since I finally killed Windows to go pure Linux, I need to
transfer my old Outlook mail to Mozilla :-)

Comment 6

14 years ago
Thunderbird 0.2 is affected by the same problem: can save .eml but cannot open
them (no menu item, no drag&drop, no doubleclick, no commandline), such a
hateful thing! :-)

Comment 7

14 years ago
Actually, importing eml is quite easy using a bit of hacking.

1. Take your eml file, copy it to your mail directory, give it a name without 
an extension, e.g. 'Import'.
2. Edit the file and add the special Moz headers to the beginning (From, X-
UIDL, X-Mozilla-Status, X-Mozilla-Status2). Just grab the first 4 lines from 
some real mail message (e.g. in your Inbox). I edited X-UIDL to be nonexistent 
(FFFFFFFF), for safety.
3. You can concatenate any number of emls into this one file, providing you add 
the headers to each of them.
4. Start Mozilla Mail and a new folder named Import should appear, containing 
all the messages you packed in the created file.

Now it is possible to move the messages around as you please. This process can 
also be automated, using some script.

But of course, native Import function in Mozilla would be easier and could have 
more functions.

Comment 8

14 years ago
Created attachment 133745 [details]
Workaround for Windows 2000

Maybe this helps until EML import is supported by Thunderbird
--------
@echo off
rem Setup:
rem 1) create an empty file "eml-import" (no extension) in your Thunderbird
LocalMail folder
rem 2) set EMLIMP to the FQPN of eml-import (including eml-import) - see
example below
rem 3) copy this file (ThunderbirdImporter.cmd) to %USERPROFILE%\SendTo
rem    e.g. L:\Dokumente und Einstellungen\DonMartin\SendTo
rem you now can select an eml in Explorer and use SendTo ThunderbirdImporter
rem imported emls are seen in Thunderbird, folder eml-import only after closing
and reopening Thunderbird

set EMLIMP="L:\Dokumente und
Einstellungen\DonMartin\Anwendungsdaten\Thunderbird\Profiles\default\qqs3afcr.slt\Mail\Local


Folders\eml-import"
if exist %EMLIMP% goto ONCEAGAIN
echo %EMLIMP% does not exist!!!
goto THEEND
:ONCEAGAIN
if "%1"=="" goto THEEND
echo Processing: %1 ...
rem TODO check for correct file extension to prevent importing e.g. doc
rem TODO check if already this header is contained in the eml file 
echo From - Tue Oct 21 11:22:33 2003 >> %EMLIMP%
echo X-UIDL: FFFFFFFF >> %EMLIMP%
echo X-Mozilla-Status: 0001 >> %EMLIMP%
echo X-Mozilla-Status2: 00000000 >> %EMLIMP%
type %1 >> %EMLIMP%
shift
goto ONCEAGAIN

:THEEND

------

Comment 9

14 years ago
Created attachment 133746 [details]
Workaround for Windows 2000

Maybe this helps until EML import is supported by Thunderbird
--------
@echo off
rem Setup:
rem 1) create an empty file "eml-import" (no extension) in your Thunderbird
LocalMail folder
rem 2) set EMLIMP to the FQPN of eml-import (including eml-import) - see
example below
rem 3) copy this file (ThunderbirdImporter.cmd) to %USERPROFILE%\SendTo
rem    e.g. L:\Dokumente und Einstellungen\DonMartin\SendTo
rem you now can select an eml in Explorer and use SendTo ThunderbirdImporter
rem imported emls are seen in Thunderbird, folder eml-import only after closing
and reopening Thunderbird

set EMLIMP="L:\Dokumente und
Einstellungen\DonMartin\Anwendungsdaten\Thunderbird\Profiles\default\qqs3afcr.slt\Mail\Local


Folders\eml-import"
if exist %EMLIMP% goto ONCEAGAIN
echo %EMLIMP% does not exist!!!
goto THEEND
:ONCEAGAIN
if "%1"=="" goto THEEND
echo Processing: %1 ...
rem TODO check for correct file extension to prevent importing e.g. doc
rem TODO check if already this header is contained in the eml file 
echo From - Tue Oct 21 11:22:33 2003 >> %EMLIMP%
echo X-UIDL: FFFFFFFF >> %EMLIMP%
echo X-Mozilla-Status: 0001 >> %EMLIMP%
echo X-Mozilla-Status2: 00000000 >> %EMLIMP%
type %1 >> %EMLIMP%
shift
goto ONCEAGAIN

:THEEND

------
(Reporter)

Comment 10

14 years ago
Comment on attachment 133745 [details]
Workaround for Windows 2000

removing dup
Attachment #133745 - Attachment is obsolete: true

Comment 11

14 years ago
Since few months in our company we are using mozilla-mail, because we have
windows and Linux-Clients and wanted to use the same mail-client for everyone.
Now our users uses the "save as eml-File" function to save the mail(s) in a
folder of i.e. a project for a customer. In such a folder is saved everything to
this project, i.e. facsimiles, letters, mails etc.. So everyone can go to the
project-folder i.e. project-number 12345 and sees all what's going on in that
project.
Now when he/she want's to open the saved mail it's not working. And I can't tell
a normal office-user to use such a workaround!
I think other companies do have the same problems but they havend own edv
employees (because of outsourcing) and "normal office-users" are afraid of using
bugzilla :) or they don't know that bugzilla exists.
This was fixed in bug 239555 on 2004-04-14.

*** This bug has been marked as a duplicate of 239555 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE

Comment 13

13 years ago
I don't think this is a dupe of 239555 - that bug is about opening a .eml file
in a message window. This is about importing a .eml file into your mailbox along
with all your other mail messages. It looks like some of the bugs that have been
duped against this one should be dupes of 239555, which isn't helping.

Comment 14

13 years ago
You're right, this isn't a dupe.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---

Comment 15

13 years ago
See bug 241213.
(Reporter)

Updated

13 years ago
Depends on: 241216
(Reporter)

Updated

13 years ago
Depends on: 241213

Comment 16

13 years ago
Mozilla Thunderbird 0.6 can open *.eml files :). But without graphics :( yet. 

Comment 17

13 years ago
The problem with graphics not showing in a .EML file is bug 174692.

Comment 18

13 years ago
*** Bug 244887 has been marked as a duplicate of this bug. ***

Comment 19

13 years ago
*** Bug 252452 has been marked as a duplicate of this bug. ***

Comment 20

13 years ago
In bug 174692 comment 22, someone has posted a URL to a bash script which is 
supposed to perform the integration of a .EML into mail.

Comment 21

13 years ago
*** Bug 259846 has been marked as a duplicate of this bug. ***

Comment 22

13 years ago
Workaround: Drag-n-drop selected files into Outlook Express, then import mail 
from Outlook Express into Thunderbird. I still had my OE install from before I 
switched, conveniently empty of messages.
Product: MailNews → Core
Depends on: 269826
Blocks: 269826
No longer depends on: 269826

Comment 23

12 years ago
Why does this depend on bug 241213 and bug 241216? I would have thought it
possible to have a suitable drag-drop handler without implementing an import
user-interface elsewhere.

The workaround in comment #9 suggests that the internal mailbox storage is
sufficiently similar to a .eml file that the import mechanism should be only
need to be slightly different to the existing drag-drop handlers that deal with
moving mail between different local folders.

Anyway, following advice from comment #22, I used the convenient "mail file
import tool for Thunderbird" called "Outlook Express" that Microsoft were kind
enough to provide for free :-)

Comment 24

12 years ago
Email import is included in AusDilecce's TB AutoSave Extension
http://www.supportware.net/mozilla/#ext13

Comment 25

11 years ago
(In reply to comment #23)
> Why does this depend on bug 241213 and bug 241216? I would have thought it
> possible to have a suitable drag-drop handler without implementing an import
> user-interface elsewhere.

This bug isn't (necessarily) about drag-and-drop; that's bug 171907.  However, drag-and-drop is an insufficient UI, as it's not accessible; using the 
Message|Copy menu from the message window (or something similar) needs to be done for .EML files.  Also for message/rfc822 attachments -- which is 
bug 204612.  However, you're right -- the dependencies are incorrect.
Assignee: cavin → nobody
Blocks: 241213
Status: REOPENED → NEW
Component: MailNews: Import → MailNews: Backend
No longer depends on: 241213, 241216
QA Contact: nbaca
Summary: Ability to import e-mail messages from .eml text files → Ability to import e-mail messages from .eml text files to folders (Message|Copy)

Comment 26

11 years ago
*** Bug 348000 has been marked as a duplicate of this bug. ***

Comment 27

11 years ago
*** Bug 362657 has been marked as a duplicate of this bug. ***

Comment 28

10 years ago
For your import needs there's great ImportExportTools extension (for thunderbird) - http://nic-nac-project.de/~kaosmos/mboximport-en.html
QA Contact: backend
Product: Core → MailNews Core

Updated

8 years ago
Duplicate of this bug: 501109
Duplicate of this bug: 516246
Blocks: 516240
Summary: Ability to import e-mail messages from .eml text files to folders (Message|Copy) → Ability to import/save e-mail messages from .eml text files to folders (Message|Copy)

Comment 31

8 years ago
You don't need to drag-drop .eml files into Outlook Express, and then import from Outlook Express. You can drag-drop into Thunderbird.

We need a menu command for this. Drag-drop (only) is not sufficient and not obvious.

Comment 32

8 years ago
There are some side effects with the .eml files :
When I opened an attached .eml file, or directly a previously saved .eml file, it shows up with the "reply", "foward" etc buttons in Thunderbird 3.
If I hit "reply", a new window appears, with the correct addresses, But 
1- the auto-save and save as draft ends with an error
2- the sending is not possible (same error)
BUT
the "send-later" feature is working and I can then move the reply to the drafts folder and edit it......
(Assignee)

Comment 33

6 years ago
Created attachment 572335 [details] [diff] [review]
FIx this and test it

Here's a fix for this. It enables Message > Copy and "Copy" in the context menu. Note that this only works for .eml files, not attached emails, since the copy service can't handle attached emails yet.
Assignee: nobody → squibblyflabbetydoo
Status: NEW → ASSIGNED
Attachment #572335 - Flags: review?(dbienvenu)

Comment 34

6 years ago
Comment on attachment 572335 [details] [diff] [review]
FIx this and test it

thx for the patch - can you replace "1" with Ci.nsMsgMessageFlags.Read (or Components.interfaces.nsMsgMessageFlags.Read, whichever works...). Other than that, r=me.
Attachment #572335 - Flags: review?(dbienvenu) → review+
(Assignee)

Comment 35

6 years ago
Checked in: http://hg.mozilla.org/comm-central/rev/d8ca97163b22
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago6 years ago
Component: Backend → Message Reader UI
Flags: in-testsuite+
Product: MailNews Core → Thunderbird
QA Contact: backend → message-reader
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 11.0
(Assignee)

Updated

6 years ago
Blocks: 700899
(In reply to patrice Arnal from comment #32)
> There are some side effects with the .eml files :
> When I opened an attached .eml file, or directly a previously saved .eml
> file, it shows up with the "reply", "foward" etc buttons in Thunderbird 3.
> If I hit "reply", a new window appears, with the correct addresses, But 
> 1- the auto-save and save as draft ends with an error
> 2- the sending is not possible (same error)
> BUT
> the "send-later" feature is working and I can then move the reply to the
> drafts folder and edit it......

Patrice, can you check if we have a bug for that problem (confirmed), and file a new bug with more details (steps to reproduce, actual results, expected results) if we don't?
(In reply to Jim Porter (:squib) from comment #35)
> Checked in: http://hg.mozilla.org/comm-central/rev/d8ca97163b22

Jim, thank you!! That's good news!
(Assignee)

Comment 38

6 years ago
(In reply to patrice Arnal from comment #32)
> There are some side effects with the .eml files :
> When I opened an attached .eml file, or directly a previously saved .eml
> file, it shows up with the "reply", "foward" etc buttons in Thunderbird 3.
> If I hit "reply", a new window appears, with the correct addresses, But 
> 1- the auto-save and save as draft ends with an error

On my system (11.0a1) this fails...

> 2- the sending is not possible (same error)

... but this works.

(1) already has a bug filed on it (bug 548070), so I think we're ok as far as followups go. There's also bug 389650, which is probably caused by the same underlying issue.

Comment 39

6 years ago
You are right : bug 548070 is almost the same as mine.

I use Thunderbird 7.0.1 on an Ubuntu 11.10 64 bits architecture

I will fill other comments under this bug.
Thanks
You need to log in before you can comment on or make changes to this bug.