Last Comment Bug 10801 - [FEATURE] Save messages
: [FEATURE] Save messages
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
P3 normal (vote)
: M12
Assigned To: jefft
: esther
Depends on:
Blocks: 1775 10791 11091
  Show dependency treegraph
Reported: 1999-07-29 15:50 PDT by scottputterman
Modified: 2008-07-31 01:21 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image scottputterman 1999-07-29 15:50:30 PDT
bug tracking feature in Summary.
Comment 1 User image sol 1999-08-24 15:52:59 PDT
This needs to be fixed for PR1, so I added a note to the Status Whiteboard.
Comment 2 User image Phil Peterson 1999-08-27 11:00:59 PDT
Triage to M11
Comment 3 User image jefft 1999-09-04 08:00:59 PDT
Save message as *.eml file now (9-3-99) works for Pop3. Waiting for
SaveMessageToDisk to be implemented (mscott) for Nntp & Imap. Save message as
*.hml & *.txt requires to hook up with mime and some other converter. Save
message as Templates may use the copy service to do the trick.
Comment 4 User image jefft 1999-09-08 13:41:59 PDT
Save message as template from pop3 to pop3 template folder is working. Pop3
messages to the imap templates folder isn't working yet due to the unwanted
dummy header ans x-mozilla-status headers. mscott, when you implement
SaveMessageToDisk for NNTP and IMAP message service could you make sure they
generate additional dummy envelope header and x-mozilla-status headers.
Comment 5 User image Scott MacGregor 1999-09-08 13:44:59 PDT
Hey Jeff, can this stuff use the copy service or does it need the message to be
in a temp file. With my performance changes, it is really easy to get a message
from pop or news in the form of a stream where you are a stream listener.

I'm still doing save message to a temp file but would it be faster if you can
stream the message directly to the appropriate folder?
Comment 6 User image jefft 1999-09-08 14:14:59 PDT
SaveMessageToDisk is meant to save the raw message to the disk (*.eml file). I
am afraid that we cannot avoid it. For saving messages as *.html or *.txt files
we will be able to utilize the stream listener. We could pipelining through the
stream converter and then save the final result to a local file. I am using copy
service CopyFileMessage to save message as template. It requires using a temp

Is it possible for you to add an additional boolean argument to
thr SaveMessageToDisk() to indicate whether we want to generate dummy envelope
and x-mozilla-status headers. We needs to have those headers when messages are
saved to a pop3 templates folder. And not those headers when messages are saved
to an Imap4 templates folder.
Comment 7 User image jefft 1999-09-17 16:40:59 PDT
Save message as raw rfc822 mail message and html document are working correctly
on Pop3, News, and Imap4. Save message as plain text also coded. As long as
akkana finishes her text/html => text/plain converter, the code will just work.

Save message as template, is working for messages within the same server. Cross
the server boundary isn't working yet. It a tedious job to figure out whether a
dummy header should be generated/stripped out when messages were copied to the
destination Templates folder. 4.0 servers prohibits a message contains dummy
berkerley header being append to the server. Local mail folder won't work if a
message was copied from the imap server which does not contain dummy berkerley
envelope header plus the X-Mozilla-Status flags.
Comment 8 User image lchiang 1999-09-20 15:52:59 PDT
(target milestone is M11 or M12 - add to mail beta tracking bug)
Comment 9 User image jefft 1999-10-07 08:33:59 PDT
I have fixed the save message as template problem. The only not working now is
save message as plain text which akkana will have a fix in the future. The works
for Save Messages are done for the mail/news team.
Comment 10 User image esther 1999-11-21 09:37:59 PST
Using win98 build 1999111909 m12, and 1999112008 on mac and linux, the menu
item File|Save As|Template is not saving a message selected from my IMAP Inbox
and saved as Template to my IMAP Templates folder.   I read through this bug and
based on the last comment (10/07/99 8:33) this should be working for IMAP too.
Jeff let me know if I'm not testing this correctly.  Note: My Template folder is
set up correctly because I can Save As Template a newly created message.

Also, Save as Text is not working, per comments in this bug this now belongs to
Akkana, should I write a new bug for her?
Comment 11 User image leger 1999-11-22 09:35:59 PST
M11 is over, moving to M12 for now since this bug reopened.  phil may want to
Comment 12 User image jefft 1999-11-23 14:06:59 PST
I have the fix in hand waiting for review. The html to txt converter is
addressed in bug 1775.
Comment 13 User image Akkana Peck 1999-11-23 14:14:59 PST
Why does this require a stream converter?  When you save, aren't you saving from
a document, so you can just use the nsIDocumentEncoder service?  That seems much
more efficient than using whatever means you're currently using to save to html
(which means saving to XIF, parsing the XIF then converting to html) then taking
that html and parsing it again, saving it to XIF then parsing the XIF again and
saving to plaintext (which is what will happen if you save to html then use a
stream converter to convert).
Comment 14 User image jefft 1999-11-23 14:34:59 PST
No, we are not saving it into html first then convert it into a text document.
We are trying to use the stream converter's magic without going through any
temporary file. For example, from A to D, we don't do A->B, B->C, then C->D
ourself. We leave it to the nsIStreamConverterService to do the work. We only
tell the stream converter service what's the src and the destination format we
are interested. Stream converter service will then based on it's registry to
invoke a converter or a series of converters to do the convertion.

The fix for save as template has been checked in. nsIMsssenger.idl,
widgetglue.js and nsMessenger.cpp modified.
Comment 15 User image esther 1999-11-24 13:59:59 PST
Using builds 1999112409m12 on windows and linux and 19991124 on mac most of this
is fixed.  Save as Template working on Win & Mac linux has a new bug for not
working correctly (20063) and text not working on all is a new bug (20064) this
is verified for the most part.

Note You need to log in before you can comment on or make changes to this bug.