Closed Bug 277620 Opened 19 years ago Closed 19 years ago

error copying the message to the sent folder before IMAP login


(Thunderbird :: General, defect)

Windows XP
Not set


(Not tracked)



(Reporter: maffew, Assigned: Bienvenu)



(Keywords: fixed-aviary1.0, fixed-aviary1.0.1)


(2 files)


I have isolated a repeatable bug with IMAP filing of sent mail. 

I have two IMAP SSL accounts in thunderbird. The bug happens when I:

* login to account A (but not yet account B)
* send an email using my account B identity

My email gets sent but I don't get a copy saved in my IMAP sent folder on account B.

Bug 224795 is similar, but I think ultimately different.

Details of my bug:

Login into account A.

Send mail from account B (not yet logged in to account B though).

Sending messages dialog:

sent message

Sending login information...


Alerts to confirm IMAP SSL certificate: Pressed OK

Alert: Login to server accountb-server failed.

Alert: Login to server accountb-server failed.

Confirm: There was an error copying the message to the Sent folder. Retry?
OK Cancel

Pressed OK and it repeated from (1)

Pressed Cancel and I get:

Send Message Error: The message was sent successfully, but could not be copied
to your Sent folder. Would you like to return to the compose window?

Actual results: The mail was sent but no copy in my account B sent-mail folder.

Expected results: Mail sent and a copy saved in my IMAP sent-mail folder on
account B.

Note that I am never prompted to enter the password for account B during
this sending mail process.

After doing all this I can login normally to account B and then sending mail and
keeping copies works fine.

If I send mail from account B without first logging into account A,
then everything works fine then too. Also if I login to account B before sending
email then it all works.

I have the offline extension enabled, and I use it sometimes, although
obviously for this bug I am working in online mode.

I tried

to save a log but I got an empty text file.
Attached file IMAP:5 log
OK I figured out how to make an IMAP log:

C:\> set NSPR_LOG_FILE=m:\home\username\tmp\tbbuglog.txt
C:\> start thunderbird

Then I anonymised it. Note that for account B the IMAP server name is the same
as the SMTP server name.

Here is what I did to get this log:

start tbird

click on mailbox in account A, login

start new message using account B identity


got SSL cert prompts, 2 login failed prompts, then a retry prompt (pressed
cancel) and a prompt about the mail getting sent but not saved, and do i want
to go back to the compose window (pressed cancel)

clicked on mailbox in account B, login

sent message, which saved ok
Are you normally prompted to enter a password for account B? Could you attach or
e-mail me your prefs.js so I can see if we might be getting confused between the
two accounts/servers?
Yes I normally get prompted for passwords when I:

* click on a folder from imap-a

* send email using SMTP using account A identity

* click on a folder for imap-b

Account A SMTP server requires authentication, but account B's SMTP server does not.

I will email you my prefs.js.
Attached patch proposed fixSplinter Review
I have the same patch in my tree for the seamonkey version of this file...
Assignee: mscott → bienvenu
Attachment #171071 - Flags: superreview?(mscott)
Comment on attachment 171071 [details] [diff] [review]
proposed fix

heh my bad!

nice find david.

anyissue with recyled comose windows? do we need to set it again? I doubt it.
Attachment #171071 - Flags: superreview?(mscott) → superreview+
we set this right before we try to send or save, so cached compose window
shouldn't be an issue. I'll also check this into the aviary branch.
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 278304 has been marked as a duplicate of this bug. ***
this looks good, testing with 20050301-1.0.1 tbird bits on linux fc3.

0. I've got 2 IMAP accounts, A and B.

1. logged onto A.

2. opened a new mail compose window and changed From: to my B account.

3. sent the mail: was prompted for SMTP password (based on A) followed by being
prompted for my passwd on B.

results: the email was sent and copied as expected to the Sent folder for B. no
error dialogs appeared.
also looks good on Mac OS X 10.3.8, with tbird 2005030702-1.0.1.
also looks good with 2005030909-1.0.1 tbird bits on winXP xp2.
it looks like david put this on the aviary 1.0 branch as well so adding that
Keywords: fixed-aviary1.0
You need to log in before you can comment on or make changes to this bug.