Unable to save sent message in "Sent" folder



17 years ago
10 years ago


(Reporter: colin, Assigned: naving)




Firefox Tracking Flags

(Not tracked)


(Whiteboard: [adt1 RTM])


(2 attachments)



17 years ago
Mozilla 1.1 Alpha on OpenVMS (built from Linux code).
This problem is new to 1.1 Alpha. 1.0 and previous versions did NOT have this bug.

With a regular POP3 mail account, when I send a mail message, I get a popup
saying "The message was sent successfully, but could not be copied to your sent
folder. Couldn't open mail sent folder.".

After experimenting I found that the problem only occurs if in my prefs I have
selected "Place a copy in sent folder". If I instead chose "Place a copy in
other" and then select the sent folder, it works!

Looking in my prefs.js here's the problem:

When I select "Place a copy in sent":
user_pref("mail.identity.id2.fcc_folder", "mailbox://test@theblakes.com/Sent");

When I select "Place a copy in other" and the select sent:
user_pref("mail.identity.id2.fcc_folder", "mailbox://test@theblakes.com/sent");

Notice the difference in case of the "sent" folder name.

Like I said, this problem is new to 1.1 Alpha.

I am using the "Sent" folder of my mail account, not the Local Folders "sent"
folder (notice the case difference here too, this is how the sent folder names
appear in the left pane; "Sent" for the mail account's sent folder and "sent"
for the Local Folder's sent folder. Relevant?


17 years ago
QA Contact: gayatri → gchan

Comment 1

17 years ago

Trying on both Win2k and Linux 2.2 (red hat 7.0):
Trunk 2002-06-20-11-trunk/ 
  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a+) Gecko/20020620 
And mozilla 1.1 alpha build (20020611)
 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610

I am unable to reproduce this problem. I don't know if this
is a "Dec" only problem or not. But I can't reproduce this.

Reporter, what type of email are you composing? Html or text?
Does this happen with every message you compose/reply/forward?
Or does it happen once in a while?

Have you tried a new profile (w/same settings as your previous one)? maybe
somehow your profile got corrupted?

I could see you getting that error mesg if you had a IMAP mail account
but not Pop. Since Pop account stores all mail locally, you should
not be running into this. Do you have enough disk space on your computer?
Maybe that's why it gives you that error message?

I looked at prefs. Your first pref is correct.  This is what
your prefs should look like for all 4 cases of storing mesgs
on your sent folder (either locally or under pop account):

Sent folder on Pop account:
 user_pref("mail.identity.id1.fcc_folder", "mailbox://pop2@foo.mcom.com/Sent");
Sent folder on local folders:
 user_pref("mail.identity.id1.fcc_folder", "mailbox://nobody@Local%20Folders/Sent");
Other: sent folder on pop acnt:
user_pref("mail.identity.id1.fcc_folder", "mailbox://pop2@foo.mcom.com/Sent");
Other: sent on Local folders:
 user_pref("mail.identity.id1.fcc_folder", "mailbox://nobody@Local%20Folders/Sent");


Comment 2

17 years ago
Its happens for all my mails now (starting with 1.1 Alpha). I am composing HTML
mails. And its certainly POP, not IMAP.

If I create a new profile then the pref is lowercase for both the "Place a copy
in sent" and "Place a copy in other" cases. And it works in both cases. So its
like it wants the folder to be all lowercase, but for some reason the old
profile creates the name with a capital S in the "Place a copy in sent" case.

OpenVMS does NOT have a case-sensitive file naming system, so a file created as
"Sent" would come back via a readdir as "sent". I wonder if that could be
causing the problem. Any other O/S's where this is the behaviour?

Comment 3

17 years ago
Reporter, you might be right.
I talked to someone who works on prefs and did say the prefs
are 'case sensitive'. So maybe since DEC isn't case sensitive
that's why its failing?

For an experiment, on windows 2k, i edited my pref.js and changed
"Sent" to 'sent' and tried to compose and send a mesg 
(using mozilla 1.1alpha build) and it did come up with error
mesg you describe.

Though you should have run into this problem sooner?
I'm not sure prefs have changed that much since 1.1alpha?
But I don't know.

I would say try a more recent release but doesnt look
like DEC builds get updated on a regular basis..


Comment 4

17 years ago
OpenVMS may not have nightly builds but we've shipped every release since about
M10 or M11. This problem is new to 1.1 Alpha. Something has changed in the
Mozilla code to cause this problem.

Maybe some new code isn't using nsFileSpec::operator when comparing filespecs
(on OpenVMS it does a case-blind comparison)? My guess would be something like
that got added post 1.0.

Comment 5

17 years ago
There a couple of problems here.

First, because OpenVMS has a case-blind file naming system (you can create a
directory named "Sent" but when you readdir() it you'll get "sent") some of the
special folders are showing up in the folder list in lowercase. Interestingly
Inbox and Trash are always capitalized, but Drafts and Templates are all
lowercase. And the case of Sent depends up if I define it in prefs via "Place a
copy in sent folder", or "Place a copy in other" and then select the "sent"
folder. But this behaviour has always been like this, and sending mail has
always worked, until 1.1 Alpha.

Second, something has changed in 1.1 Alpha which causes the file naming
funniness described above to now cause a problem.

I'm not sure which problem I want to fix. Fixing problem 2 will get mail working
correctly again on OpenVMS, but working around problem 1 (so that special
folders show up with corretly cased names) is probably the better solution and
long term fix.

Can you cc in other people who have been working in this area? Someone's got to
know what changed in 1.1 Alpha to cause problem 2.

Comment 6

17 years ago
I also can't save a message I'm composing into my Draft folder any more.

If I create a new profile I see exactly the same problems. So its not that I
have some old crud in my profile.

Comment 7

17 years ago
Created attachment 88649 [details] [diff] [review]
This fixes the problem

Well, clearly some code has been added into 1.1 that REALLY wants these special
folders to have names which are capitalized. With the attached patch which
capitalizes the sent and drafts folders after they are returned from
nsDirectoryIterator (readdir), I can now save and send messages again. And as
an added bonus the sent and drafts now appear in the folder listing as Sent and

I guess this isn't the right fix or even a good workaround (since a
user-created sub-folder named "sent" would also get zapped), but hopefully it
throws enough light on the subject that some mail guru can tell me how to
correctly fix this.

Comment 8

17 years ago
Does your disk name for "Sent" folder match the prefs entries. I mean case wise. 
If so it should work correctly. Did you edit your prefs.js file by hand to change
the case ?
Assignee: mscott → naving

Comment 9

17 years ago
> Does your disk name for "Sent" folder match the prefs entries. I mean case wise. 
> If so it should work correctly. Did you edit your prefs.js file by hand to change
> the case ?

The file system stores everything in upper case, so technically its "SENT". But
the UNIX lookalike readdir() function lowercases everything so what Mozilla sees
is "sent". You can creat(), open(), stat() etc "sent", "SENT", "Sent" or
anything you like case-wise. All file system operations are case-blind and will
map onto "SENT" at the file system level.

I haven't editted prefs.js by hand. As I just explained, a creat("Sent") will
actually create the file "SENT", but open("Sent") or stat"(seNT") with both
work. And readdir() will always return "sent".

The Mozilla code purposely does case-blind comparisons when testing folder
names, and that's why for the past 2-3 years this has all worked on OpenVMS. Its
only with some change in 1.1 Alpha that something case-sensitive have been added.

As my patch above demonstrates, the Mozilla code appears to be expecting "Sent"
to come back from readdir().

Comment 10

17 years ago
I think I know what has changed, so I'll fix it. 
Keywords: nsbeta1, regression

Comment 11

17 years ago
Tell me more!!!

Comment 12

17 years ago
Created attachment 88703 [details] [diff] [review]
proposed fix

The fix is not to look for caseSensitive folders when we do it for local
The other changes were the ones that rjesup wanted me to do for branch. 

Cavin, David, Can I get reviews ? thx.


17 years ago
QA Contact: gchan → meehansqa

Comment 13

17 years ago
+          if (imapServer)
+            return rootMsgFolder->GetChildWithURI(aFolderURI, PR_TRUE, PR_FALSE
/*caseInsensitive*/, msgFolder);
+          else //local
+            return rootMsgFolder->GetChildWithURI(aFolderURI, PR_TRUE, PR_TRUE
/*caseInsensitive*/, msgFolder);

this can just be:
return rootMsgFolder->GetChildWithURI(aFolderURI, PR_TRUE, imapServer != nsnull
/* case (in)sensitive */, msg Folder);

Comment 14

17 years ago
thx, I have it in my tree, Can you do conditional sr ? thx.

Comment 15

17 years ago
Comment on attachment 88703 [details] [diff] [review]
proposed fix

sr=bienvenu, if last change included
Attachment #88703 - Flags: superreview+

Comment 16

17 years ago
Comment on attachment 88703 [details] [diff] [review]
proposed fix


Comment 17

17 years ago
fixed on trunk. Lets take this for branch also.
Last Resolved: 17 years ago
Keywords: adt1.0.1
Resolution: --- → FIXED

Comment 18

17 years ago
Colin, I hope you can understand my fix. thx for catching my mistake that caused
this regression. This could affect other platforms as well, again lets take this
fix for branch. 
Severity: normal → critical
Keywords: mozilla1.0.1
OS: OpenVMS → All
Priority: -- → P2
Hardware: DEC → All

Comment 19

17 years ago
Comment on attachment 88703 [details] [diff] [review]
proposed fix

actually putting in the checkmark for the r=cavin that is associated with this
Attachment #88703 - Flags: review+

Comment 20

17 years ago
plussing this regression. Some nasty side effects. 
Keywords: nsbeta1 → nsbeta1+

Comment 21

17 years ago
Out of curiosity do you have suggestions how to test this?

I'm not the qa anymore but when I was investigating I couldn't
replicate this problem on windows or linux. Things seemed
to work fine to me. Would Gregg be testing to make sure things
still work fine (test both sent & drafts folders
 [for sent: Place a copy in Sent or Place a copy in other]
 [for drafts: Keep message drafts in Drafts on or Other]
stored on the account & local folders
and Colin would need to verify this works on DEC VMS?

Comment 22

17 years ago
I'll test this first thing Monday morning. Thanks for the speedy fix.

Comment 23

17 years ago
gary, I think it is good enough if colin can verify this fix. You can recreate the
problem on win32 but it will be testing the same thing. So I'd let him verify
the fix. 

Comment 24

17 years ago
adt1.0.1+ (on ADT's behalf) approval for checkin to the 1.0 branch, pending
drivers' approvale. pls check this in asap, then add the "fixed1.0.1" keyword.
Blocks: 143047
Keywords: adt1.0.1 → adt1.0.1+, approval
Whiteboard: [adt1 RTM]

Comment 25

17 years ago
I pulled nsMsgCopy.cpp from the trunk and built it in my 1.1 Alpha tree. I can
confirm that the problem is fixed on OpenVMS. Thanks Navin.

Comment 26

17 years ago
thx colin, marking verified based on last comment.


17 years ago
Attachment #88703 - Flags: approval+

Comment 27

17 years ago
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+

Comment 28

17 years ago
fixed on branch.
Keywords: mozilla1.0.1+ → fixed1.0.1

Comment 29

17 years ago
*** Bug 155226 has been marked as a duplicate of this bug. ***

Comment 30

17 years ago
Tested using the branch build on Win2K and Mac9.1, using Mozilla/5.0 (Windows;
U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020710 Netscape/7.0 build. Tested
both scenarios - with Settings at "Place a copy in sent folder" and also "Place
a copy in other" and then select the Sent folder. Working as expected in both
Keywords: fixed1.0.1 → verified1.0.1
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.