Closed Bug 41504 Opened 24 years ago Closed 24 years ago

Incorrect error message if Copy operation fails on send

Categories

(MailNews Core :: Backend, defect, P3)

x86
Windows 2000
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla, Assigned: rhp)

Details

(Whiteboard: [nsbeta3+])

Attachments

(1 file)

If the mozilla for some reason cant save the mail in the "sent" folder you are 
presented with an error. Normally you just press OK and press Send Msg again. 

But this actually results in sending the mail twice, since the first attempt of 
sending the mail went ok, only the saving to the Sent folder failed.

In Netscape 4.x you were given a alert box saying that the mail was sent but 
couldn't be saved in the Sent folder.

Mozilla should support this feature too.
Yes we should support this same behavior. We need to let them know the message
was successfully sent. nsbeta3. I never know if these types of bugs go to jefft
or rhp......I'll try jeff and cc rhp. Moving to m20.
Assignee: mscott → jefft
Keywords: nsbeta3
Target Milestone: --- → M20
Hmm...weird. I know that the back end code is there for this error 
message...hmm..let me dig....

...ok, the code is there in mailnews/compose/src/nsMsgSend.cpp:

  //
  // If we are here, then we need to save off the FCC file to save and
  // start the copy operation. MimeDoFCC() will take care of all of this
  // for us.
  //
  nsresult rv = MimeDoFCC(mTempFileSpec,
                          nsMsgDeliverNow,
                          mCompFields->GetBcc(),
						              
mCompFields->GetFcc(), 
                          mCompFields->GetNewspostUrl());
  if (NS_FAILED(rv))
  {
    //
    // If we hit here, the copy operation FAILED and we should at least tell 
the
    // user that it did fail but the send operation has already succeeded.
    //
    PRBool oopsGiveMeBackTheComposeWindow = PR_FALSE;

    nsXPIDLString eMsg; 
    mComposeBundle->GetStringByID(NS_MSG_FAILED_COPY_OPERATION, 
getter_Copies(eMsg));

    Fail(NS_ERROR_BUT_DONT_SHOW_ALERT, eMsg);

    if (mGUINotificationEnabled)
    {
      nsMsgAskBooleanQuestionByString(eMsg, &oopsGiveMeBackTheComposeWindow);
      if (!oopsGiveMeBackTheComposeWindow)
    	  rv = NS_OK;
    }

    NotifyListenersOnStopCopy(rv);
  }


maybe the logic is messed up because of the async nature of stuff, or 
something, but it should be doing what this bug is asking for.

- rhp
Assignee: jefft → rhp
rhp, I think this is in your area. Off to you...
Ok, this should be working like its described and it is a 2 phase operation so
it sounds like you are just getting an incorrect message somewhere. Will
investigate.

- rhp
Status: NEW → ASSIGNED
Target Milestone: M20 → M19
Fixing the summary.
Summary: Splitting mail sending in two parts → Incorrect error message if Copy operation fails on send
QA Contact: lchiang → esther
Henrik,
Is this something that you can reproduce. I've checked the code and the logic 
is correct to give the appropriate failure message.

- rhp
Target Milestone: M19 → Future
Keywords: correctness
Target Milestone: Future → M19
He, he..
In build 20000721 you get another error if you change your password on you mail 
server while composing a message.
Now I get this error:
An error occurred while sending mail. The mail server responded: Polite people 
say HELO first. Please verify that you email address is correct in you Mail 
prefereces and try again.


To reproduce:
1) Launch Mozilla Mail
2) Get you messages
3) Press Compose
4) Change you password on the mail server
4.5) wait so that the mailserver dont cache the old password...:)
5) Press Send in the compose.
Forgot to mention that the mail *dont* get send and you're returned to the 
compose window. This might be another bug.
I'll investigate on the original bug...
The same (the one with polite people) alert and back to compose if the sent 
folder is pointing to a invalid folder.
Ok reproduced:
If the server is incorrect(or not running) you get a alert saying: "could not 
connect to server [OK]"
When you press OK you'r returned to the Compose window, but the message *is* 
already sent!

to reproduce:
just create an invalid mail server and point the sent folder to the INBOX of 
that server...
Ok, this is actually "correct" but not as exact as it should be. The message 
you get is not about sending the mail message, but rather, connecting to the 
IMAP server to store the message in the Sent Folder. I will see what I can do, 
but this message funnels up from the networking back end.

mscott: any idea where I could look for this?

- rhp
Can someone from QA try this out. If I go into my prefs and set the IMAP server 
for the FCC operation to something bogus, I get the proper error message about 
the copy failing and then I can either return to the window or dismiss it.

- rhp
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
If I setup Mozilla to store my Sent mails in a folder called "test" and then 
delete the folder, and compose a mail I dont get the "proper error". I get:
"An error occurred while sending mail. The mail server responded: Polite people 
say HELO first. Please verify that you email address is correct in you Mail 
prefereces and try again."
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Is this a local or remote folder?

- rhp
Status: REOPENED → ASSIGNED
suresh to try.
QA Contact: esther → suresh
Well, I just tried this and if you delete the folder, the mail back end creates 
a new one, so I am still very suspicious of this problem. 

Suresh, let me know what you find.

- rhp
hmmm...I see something different here. I tested as per the steps Henrik privided 
on 2000-07-27 04:57.

If I send a mail, the mail is sent to the recepient. No Alert dialog. And the 
sent mail is not stored anywhere.

Build tested: Today's Trunk commercial build on all platforms.
rhp, I didn't see any folder created by the backend code.
Suresh,
IMAP or local mail?
I tested using a IMAP account.
ok..this makes a difference. Let me try IMAP. It creates the file on local 
mail.

- rhp
Ok, after much digging, I did see a problem with the logic of the error 
notification on send operations. I did some small reworking in the compose back 
end and now I believe that you get the correct sequence of notifications.

Good catch Henrik.

- rhp
Summary: Incorrect error message if Copy operation fails on send → [FIXED] Incorrect error message if Copy operation fails on send
Whiteboard: [FIXED]
Per selmer and mail/news PDT.

- rhp
Whiteboard: [FIXED] → [nsbeta3+]
Ok, just checked some better error handling into the tip.

- rhp
Summary: [FIXED] Incorrect error message if Copy operation fails on send → Incorrect error message if Copy operation fails on send
one more time for gusto
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Now I get this alert box, if the pref sent folder refers to an invalid folder:
"The current command did not succeed. The mail server responded: [TRYCREATE] The 
specified mailbox does not exist"
After this I get the normal error dialog saying:
"Your send operation....."

Futhuremore this actually logs me out of the mail server!!!!!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
From what you are saying, this behaved correctly. You will get 2 dialogs. One 
for the failure on the copy. The second of..."what do you want to do".

Why are you saying we ignore the error message. That's what the first message 
is! 

- rhp
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
In Netscape 4.x I was never presented with the first error dialog.

This is what happened:
You send the IMAP command: append "t" (\Seen) {404}
The server responded: NO [TRYCREATE] The specified mailbox does not exist
Then mozilla shouldn't try to send data like:
Message-ID: <398801ED.3050706@dk.net>
etc...

This is bad!

I dont think Mozilla should show the first dialog at all to the user. Mozilla 
should just detect that the append didn't succeed and just show the second 
dialog, the one with "Your send operation.....blabla"

And even better the "Your send operation.....blabla" dialog could have a "more 
info >" button that could expand the dialog to actually show the error coming 
back from the server, like "[TRYCREATE] The specified mailbox does not exist"
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Henrik,
Look, STOP reopening this bug. The original problem as you described it has 
been fixed. You now get 2 error messages....one for the failure on the copy 
operation and a second to decide what you should do with the message. 

You may not like that behavior, but that is your opinion. In 4.x, POP email 
worked EXACTLY like that...I know, I wrote it! So 6.x now behaves consistently 
for POP and IMAP...not 2 different ways like 4.x did. If you don't like that 
behavior, thats fine, but open a different bug that is a request for a change 
on that behavior. Stop beating this dead horse. If you don't like the way the 
protocol is behaving, file a bug on that separately. 

Look, there are major things that I need to work on that do not work AT ALL and 
I can't keep wasting cycles on these types of issues. 

I think that I have been very accomodating for your requests in the past. Now, 
please return the favor.

- rhp
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
rhp..ok...:)
I've filed bug 47311 on the wrong way Mozilla handles an NO server response.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.