Send as new followed by saving a draft breaks embedded images, message is: There was an error attaching . Please check if you have access to the file.



Message Compose Window
8 years ago
7 years ago


(Reporter: Rohan Carly, Unassigned)


Firefox Tracking Flags

(Not tracked)




8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100722 AskTbFXTV5/ Firefox/3.6.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100802 Thunderbird/3.1.2

I often embed images in my emails using the "Insert a link, anchor, image..." button from within the Thunderbird compose window.

I then press the "Choose file" button and select an image (usually a JPG or GIF) that resides on my hard drive.

I send the email, and it delivers as expected.

The problem comes when I try and re-send the message. I look for the message in my "Sent Items" folder and I press CTRL + E (send as new).

I note at this point I can see the embedded image correctly displayed in the compose window of this new message.

Now I press the "Save" button once. A message flashes up briefly and then goes away by itself. I presume it just said "saving message" or similar.

The image still looks correct.

Then I press the "Save" button again. Now this exact error messsage below appears in a dialog box, with title "Save Draft Error".

   Unable to save your message as draft.
   There was an error attaching . Please check if you have access to the file.

Note the blank space between "attaching" and the full stop.

After pressing "OK" on the dialog box I am returned to the compose window, but the image now shows as a broken link, i.e. the "ALT" text is displayed, but there is no graphics.

The same error message is displayed when I press "Save" or when Thunderbird tries to auto-save on my behalf. The same message is also displayed when I press "Send", except the title on the dialog box is "Send Message Error" and says "Sending of message failed. There was an error attaching . Please check iif you access to the file."

If I am on the same computer, I can fix the error by re-embedding the image using the "Insert a link, anchor, image..." button and re point it at the image file on my hard disk.

I tried investigating this a little: If I double-click on the broken image I get an "Image Properties" dialog box. This box reveals the following in the image location box (Note that the "Attach this image to the message" tickbox is shown as ticked.):


Note that if you use "Forward", rather than "Send as new" in my procedure above, the bug is not triggered.

Reproducible: Always

Steps to Reproduce:
1. Compose a new message. Embed an image. Send it.
2. Go to your sent items, select the sent message. Press CTRL + E (send as new)
3. Press the Save button
4. Press the Save button again.
Actual Results:  
This dialog box is displayed:
Unable to save your message as draft.
   There was an error attaching . Please check if you have access to the file.

Expected Results:  
It should have saved the same way it did the first time I pressed save.
So this is over imap ?

Comment 2

8 years ago
No, over POP3/SMTP.

Comment 3

8 years ago
Is anyone willing to try my test case so this can be marked as confirmed?
(In reply to comment #3)
> Is anyone willing to try my test case so this can be marked as confirmed?

Sorry got distracted. confirming on local folders with 3.1.6build1 macos x 10.5
Ever confirmed: true
OS: Windows XP → All

Comment 5

8 years ago
This would be an issue with mimedrft.cpp, which is what implements Edit Message As New (or the mime draft-specific code in whichever mime code handles the mime structure generated by your test case). Cc'ing Jonathan, in case he wants a new challenge :-)

Comment 6

8 years ago
LOL. No time right now, but if/when things free up a bit I'll see if I can take a look.
Here's another take on what I believe to be the same problem. I've been having trouble for at least a year or more with files with graphics in them. I first noticed the problem with templates that I had created that had a graphic for a letterhead. If I opened such a template and started adding text, soon the auto save feature would try to save it, but would fail and give the error message described in the original bug report above - "error attaching . . . " I could copy the text from that message, close the message, then reopen the original template and quickly paste the text into the body of the message and hit "Send" and all would be well, but if I took too long, auto save would kick in again and the message would become unsavable and unsendable.

I soon realized there was a similar problem with forwarding messages with graphics in them. The forward would fail to send, but if I deleted all graphics from the message, I could then send it.

There are a lot of reports (10 or more that I found) of this same basic problem (varying forms) on the TB forum and Mozillazine. This problem started when I was using TB 2.0 (or thereabouts) and has persisted through a few upgrades and a move from my WinXP desktop to a new Win7 laptop and now to the newest version of Thunderbird (3.1.4). I even noticed messages on the forum indicating that Linux users are having the same problem.

I've tried all the recommendations I could find in the forums - compacting folders, deleting old messages (my entire profiles folder is only about 1GB). Yesterday I even tried switching to Eudora OSE, then SeaMonkey, but still had the same problem in those applications. 

Today I decided to completely uninstall Thunderbird - the program and the profiles. I even deleted any folders found still hanging around after uninstalling, then ran CCleaner. I reinstalled clean, created a new account, created a message with a graphic in it, saved it as a template, opened the template, added some text, clicked "save" to have it backed up as a draft, then added some more text, clicked "save" again and this time got the same old error message about "error attaching . . . " After that, I couldn't save or send the message. However, I realized that when had I clicked "save," a draft was created, so I tried closing the message that was open, then opened the draft and found I was able to edit, save and send it.

I found the same principle applies to forwarding a message with a graphic in it - I can either open a template with a graphic in it or click to create a forward of a message with a graphic in it, then click "Save" to create a draft (or wait for auto save to kick in and accomplish the same thing) and after that, the message cannot be sent and any new text added cannot be saved. However, you can close that message (without saving it obviously), then open the draft of the message, add text, click to save again or send and all is well. I've repeated this process several times since discovering the secret earlier today and it always holds true.

Thank you for anything you can do to fix this - it will make a lot of people happy.


Comment 8

7 years ago
this is a duplicate of the main issue reported on 501298
I found the cause (described on 501298) but am not enough of a programmer to fix it.
Rohan do you agree with bugmagnet ?

Comment 10

7 years ago
Yes, bug 501298 sounds the same. My description emphasises the role of inline images in this bug.
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 501298
You need to log in before you can comment on or make changes to this bug.