Closed Bug 91937 Opened 23 years ago Closed 21 years ago

"Edit As New" doesn't update From: address in the compose window with the right address

Categories

(MailNews Core :: Composition, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: blizzard, Assigned: ch.ey)

References

Details

Attachments

(1 file, 1 obsolete file)

Build is from Jul 23, 2001. If I have a message that I "Edit as New" from one of my folders the From: address in the compose window isn't updated with the From: address in the message that is edited.
If you write an email and put it in the Unsent Messages, you can Edit as New and the message will correctly put your email as "from" and the recipients email as "to" However, if you Edit as New a message in your Inbox, the From is filled with your mail info, but the TO: is changed to your name also instead of the one that sent you the email In other words, mail does not differ when mail is written by the user or by another person (which is a mistake i am certain i would have made :) This is what i see in 7/21 on linux
Sorry. This is with more than one email address in my profile. If you "Edit as New" a message the From: is always filled out with your default address - even if the From: on the message was set to one of your non-default addresses.
An update to the summary would be good. Still, the behaviour i described is a bug also, as it happens with the default account
Summary: "Edit As New" doesn't update From: address in the compose window → "Edit As New" doesn't update From: address in the compose window with the right address
reassign to varada
Assignee: ducarroz → varada
The behavior described when editing a message in the Unsent folder (or other Local Folders) is covered by bug 59548. Otherwise, the From field will default to the identity for the account which is selected when you open the message. I think this is correct, it displays the identity of the account/user who's now sending the message. I think this is really a duplicate of 59548.
Laurel: I don't think this is a duplicate. Bug 59548 is about drafts in local folders. I've just noticed (and suffered from...) this problem when selecting "Edit as New..." in Sent folder (after the first message bounced). At least in this case it has nothing to do with storing the identity or using local folders. This behavior observed in build 2001121508, I will try also a new build.
Same problem with build 2002010608.
Marking NSBETA1 and changing Platform to All. This bug is very confusing to a user. I hope my case demonstrates why it needs to be fixed. To replicate, you must have >1 account set up. 1) While not connected to Netscape's network, I composed 2 emails where the "from" was a Yahoo account I have. I said "send later." My Unsent folder is in my "NEtscape mail" account, which is where the SMTP server is judge (internal netscape server). 2) I go to "SEnd Unsent Messages" while *not* connected to the network and get "Sending of message failed...can't connected to SMTP server" 3) I doublecheck who the "from" is, and it is my Yahoo address. I decide to try to send the message new so click "Edit as new message" RESULT: The "new" message has my NETSCAPE "from" address selected,not the Yahoo one which is shown when the message is in the Unsent folder. I verified that both while the message was in Unsent and when I opened it before editing it it has my Yahoo "from" address. I tried sending the same message again, by reselecting my Yahoo "from" and saying "Send Later". Same result occured. When I change the NEW message "From" to Yahoo and do "Send Now" (rather than later) it sends as expected. replicated in Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8+) Gecko/20020130 and Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8+) Gecko/20020213
Keywords: nsbeta1
OS: Linux → All
Discussed in 2/26 bug meeting with Mktg Engineering and PjM. Decision was to nsbeta1 minus and move to 1.2.
Keywords: nsbeta1nsbeta1-
Target Milestone: --- → mozilla1.2
Using Gecko/20020620 trunk build: -Was not able to send unsent messages because I was not able to access the default account's smtp server. -Went to account settings to change that account's smtp server to one I would be able to send my unsent mail through -I went to go to Send Unsent Messages and it is not highlighted. No way to send unsent messages. I may be an exception to how most people use mail but for me the ability to send messages later is basically useless..and I guess I will just save all messages as drafts since that saves me several steps always.
Blocks: 154188
taking all of varada's bugs.
Assignee: varada → sspitzer
Adding me to the CC list. I have to say that I discover that bug when I was trying to re-post a message to a newsgroup. Of course, I didn't realize the entity was incorrect, and the message was posted with my default entity. This is very annoying because it increases the spam risk! I'll vote for the bug.
Re: Christopher Blizzard's comment 2: > If you "Edit as New" a message the From: is always filled out with your > default address - even if the From: on the message was set to one of your > non-default addresses. Presumably you mean "Edit as New" on a message in the Sent folder, or some other message originally composed *and sent* by you. As Laurel stated in comment 5, what I see (Moz 1.5) is that the From: address is initialized according to the account holding the folder containing the message. However: if the message was saved rather than sent (in the Templates or Drafts folder), it will use the original identity. This seems to be controlled by a custom header saved in the draft/template: X-Identity-Key: id2 And in fact, copying a Draft message with this header into the Inbox (or Drafts, for that matter) of another account, then opening from that Inbox with Edit as New, maintains the original identity. ==== NOW ===> A non-draft message from Local Folders, opened with Edit as New, is init'd with the default identity. This leads to the problem described by Knocte in comment 12, since outgoing news messages are stored in Local Folders/Sent. I'm not sure how IMAP / Sent folders are maintained -- if they're put into the Local Folders, likely the same result. This seems to me to be the real crux of this bug -- most of the time you want to use Edit as New, it's on a message you've already sent. An additional issue: When using Edit as New on a mail that you received from someone else, the From: is set as described above; To: continues to be your original receiving address; and, if there is an original Reply-To: header, that is maintained as well, so unless you edit the headers, the message will go out as From:You.current, To:You.original, Reply-To:OriginalSender. If something is changed for this bug to adjust the From: according to the From: of the original message, then perhaps the To: and Reply-To: headers can be tweaked appropriately as well. Comments 1, 3, 8 & 10 (Francisco León, Susie Wyshak) are about bug 59548, which apparently has been fixed for quite a while. Clearing milestone on this bug.
Target Milestone: mozilla1.2alpha → ---
In general "Edit as New" should behave like you clicked "Compose" to create a completely new message. From this point of view everything works fine. But yes, we could be smarter here. I guess that calling getIdentityForServer() and getBestIdentity() (see Scott's patch from bug 18906) but with the From: address (instead To: and CC:) as optionalHint should do it. We should do this in any case because the patch mentioned had an side effect for "Edit as new". When editing a message as new which we received, the From: will become the first identities address which matches one a To: or CC: address. That can be confusing.
Attached patch proposed patch (obsolete) — Splinter Review
This patch does what I described in my last comment. It works and sets the From: for a edited as new message to the From: of the original message (if this From: is one of our identities addresses). Currently this only works for messages from an accounts folder, so not for messages under Local Folders. I moved this part to bug 229817 because implementing this will also affect the behaviour when replying to a message (and more?).
Attachment #138231 - Flags: review?(mscott)
Comment on attachment 138231 [details] [diff] [review] proposed patch good catch ere. Your change sounds like the right thing to do. I expect we'll be fine tuning this routine even more in the future as well.
Attachment #138231 - Flags: review?(mscott) → review+
Attachment #138231 - Flags: superreview?(bienvenu)
Christian's going to hate me, but: + var hintForIdentity; + if (type == msgComposeType.Template) { + hintForIdentity = hdr.author; + } + else { + hintForIdentity = hdr.recipients + hdr.ccList; + } this can be just: var hintForIdentity = (hintType == msgCompose.Template) ? hdr.author : hdr.recipients + hdr.ccList; other than that, looks fine.
> Christian's going to hate me, but: Mostly I hate myself for not seeing these situations. :)
Attachment #138231 - Flags: superreview?(bienvenu)
Attached patch patch v2Splinter Review
Changed if according to comment #17.
Attachment #138231 - Attachment is obsolete: true
Assignee: sspitzer → ch.ey
Attachment #138503 - Flags: superreview+
I'll check this in.
fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
This bug is still present in Mozilla 1.6. Shouldn't this bug be fixed already?
it's fixed on the trunk, i.e., 1.7, not 1.6.
fixed on the m4 branch too.
Blocks: 230700
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: