Closed
Bug 64267
Opened 24 years ago
Closed 13 years ago
clicking on email address/mailto link in message body doesn't set the correct From (identity) - use account/identity of current message, not the default account/identity
Categories
(MailNews Core :: Composition, defect)
MailNews Core
Composition
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 8.0
People
(Reporter: bugzilla, Assigned: squib)
References
Details
(Keywords: privacy)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Bienvenu
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
If I have several mail account and check mail on one of them and then press
CTRL+M for a new message the From address is set to identity of the current
mail account.
But if I press on a mailto link is a message of the mail account or use the
"Send Mail to" in the header of a mail, the From address is set to the first
mail account.
Expected:
Starting compose in anyway when you're inside a specific mail account should set
the From address to the identity of the current mail account.
Comment 2•24 years ago
|
||
nominating this bug for nsbeta1-The context menu item "send mail to" in the
envelope area of the message should behave the same as new message, where the
from field gets filled with the current mail account and not the default.
Keywords: nsbeta1
Comment 3•24 years ago
|
||
Scott or Jean-Francois,
Do we have the ability to get the correct identity from within the message pane
or message headers? I'm not sure how far the sandbox extends and if it prevents
us from getting access to the selected identity.
Whiteboard: [NEED INFO]
Comment 4•24 years ago
|
||
I don't know...
Comment 5•24 years ago
|
||
marking nsbeta1-
Reporter | ||
Comment 7•23 years ago
|
||
What's the internal difference between hitting CTRL+M (which chooses the correct
sender) and right clicking on mailaddress and saying compose mail to (which
doesn't select the correct sender)
Comment 9•22 years ago
|
||
This bug also applies, when left-clicking on an email address within a message.
I assume that it's the same bug.
Comment 10•21 years ago
|
||
As noted in bug 81281, the symptom of the wrong identity used when a compose
window is opened using the "Compose Mail To" item (in the context menu for an
envelope-header email address) has been fixed. (I haven't been able to find the
bug which contained the fix for this; but I think it must have been fixed before
bug 167815 was filed.)
The symptom of the wrong identity used when a compose window is opened by
clicking on an email address in the message body is still valid. Note that it's
true both for mailto: links in HTML and linkified mailto's and email addresses
in plain text.
Summary: clicking on email address doesn't set the correct From → clicking on email address/link in message body doesn't set the correct From (identity)
Comment 11•20 years ago
|
||
*** Bug 221861 has been marked as a duplicate of this bug. ***
Comment 12•20 years ago
|
||
*** Bug 262063 has been marked as a duplicate of this bug. ***
Updated•20 years ago
|
Product: MailNews → Core
Updated•20 years ago
|
Summary: clicking on email address/link in message body doesn't set the correct From (identity) → clicking on email address/mailto link in message body doesn't set the correct From (identity)
Comment 13•20 years ago
|
||
*** Bug 296669 has been marked as a duplicate of this bug. ***
Comment 14•20 years ago
|
||
*** Bug 194809 has been marked as a duplicate of this bug. ***
Comment 15•19 years ago
|
||
*** Bug 303619 has been marked as a duplicate of this bug. ***
Comment 16•19 years ago
|
||
Can we get this changed to a Thunderbird bug so Thunderbird can be fixed? I have
verified that this happening in Thunderbird.
Comment 17•19 years ago
|
||
(In reply to comment #16)
> Can we get this changed to a Thunderbird bug so Thunderbird can be fixed? I have
> verified that this happening in Thunderbird.
This bug is assigned to "Core" which is the backend code, shared by Thunderbird
and Seamonkey.
Comment 18•18 years ago
|
||
*** Bug 346698 has been marked as a duplicate of this bug. ***
Comment 19•18 years ago
|
||
An extension has been written called "Corrtect Identity" which corrects this https://addons.mozilla.org/thunderbird/1203/
However, this shouldn't rely on a user installing an extension. It was reported in ealier versions and fixed, so why has it re-appeared now?
See bug 81281
Updated•18 years ago
|
Assignee: sspitzer → nobody
Severity: normal → major
Keywords: privacy
QA Contact: sheelar → composition
Updated•16 years ago
|
Product: Core → MailNews Core
Updated•16 years ago
|
Flags: wanted-thunderbird3+
Comment 26•14 years ago
|
||
(upgrade summary)
Summary: clicking on email address/mailto link in message body doesn't set the correct From (identity) → clicking on email address/mailto link in message body doesn't set the correct From (identity) - use account/identity of current message, not the default account/identity
Assignee | ||
Comment 27•14 years ago
|
||
Taking, since I have a (currently very messy) patch for this.
Assignee: nobody → squibblyflabbetydoo
Status: NEW → ASSIGNED
Assignee | ||
Comment 28•14 years ago
|
||
In a way, I feel a little bad about this, since (according to jcranmer) nsMsgComposeContentHandler.cpp has been essentially unchanged since it was first checked in to CVS, but here's a patch to fix this.
Note that it doesn't technically do what the bug title says, since no other part of Thunderbird does that either. Instead, this uses the first identity for the server associated with the nsIMsgDBHdr, like everything else does. That should probably be fixed one day, but for now, I think we should aim for consistency.
:bienvenu, I'm not sure what we should do here for tests, as this isn't an area I'm very familiar with (I expect Firefox/Toolkit has some tests for things like this, but I'm not sure where to look).
One thing in particular that I didn't test was opening mailto: urls from another application, since apparently Ubuntu 11.04 decided that users were too stupid to be allowed to input a custom command for the mailto: handler.
Attachment #543575 -
Flags: review?(dbienvenu)
Comment 29•13 years ago
|
||
Comment on attachment 543575 [details] [diff] [review]
Fix this (no tests)
I'm not sure that you should error out instead of just falling through to the OpenComposeWindowWithURI call (e.g., if you can't get a msg hdr). I'm not sure in what situations this code gets called. Would it get called from clicking on a mailto link in a content tab, or in Seamonkey by clicking on a mailto link in a web page?
Assignee | ||
Comment 30•13 years ago
|
||
(In reply to comment #29)
> I'm not sure that you should error out instead of just falling through to
> the OpenComposeWindowWithURI call (e.g., if you can't get a msg hdr). I'm
> not sure in what situations this code gets called. Would it get called from
> clicking on a mailto link in a content tab, or in Seamonkey by clicking on a
> mailto link in a web page?
Ah, right. I actually meant to do like you said, but I forgot about it halfway through as I was trying to figure out how to get at the message header. I tested this patch with content tabs with mailto: links and everything seems ok.
Attachment #543575 -
Attachment is obsolete: true
Attachment #543832 -
Flags: review?(dbienvenu)
Attachment #543575 -
Flags: review?(dbienvenu)
Comment 31•13 years ago
|
||
Comment on attachment 543832 [details] [diff] [review]
Don't bail out when we can't get an identity
r=me, with some nits:
mmm, delicious, brined compose window :-) I know you just moved this text, but please fix the typo
+ * own chrome url you want to use in brining up a
+ * compose window, pass it in here.
I think GetMessageHeader should fail if msgHdr is null, so NS_ENSURE_SUCCESS(rv, rv) should be sufficient.
+ rv = msgURI->GetMessageHeader(getter_AddRefs(msgHdr));
+ NS_ENSURE_SUCCESS(rv,rv);
+ if (!msgHdr)
+ return NS_ERROR_FAILURE;
Should pass in &rv here, and add an NS_ENSURE_SUCCESS(rv, rv) after.
+ nsCOMPtr<nsIMsgAccountManager> accountManager = do_GetService(
+ NS_MSGACCOUNTMANAGER_CONTRACTID);
Attachment #543832 -
Flags: review?(dbienvenu) → review+
Assignee | ||
Comment 32•13 years ago
|
||
Comment on attachment 543832 [details] [diff] [review]
Don't bail out when we can't get an identity
Requesting approval for aurora. It might be too late for 6.0 though...
Attachment #543832 -
Flags: approval-comm-aurora?
Assignee | ||
Updated•13 years ago
|
Attachment #543832 -
Flags: approval-comm-aurora?
Assignee | ||
Comment 33•13 years ago
|
||
Comment on attachment 543832 [details] [diff] [review]
Don't bail out when we can't get an identity
I suppose I should get sr on this as well, since I changed an API. :)
Attachment #543832 -
Flags: superreview?(neil)
Comment 34•13 years ago
|
||
Comment on attachment 543832 [details] [diff] [review]
Don't bail out when we can't get an identity
>-NS_IMETHODIMP nsMsgComposeContentHandler::HandleContent(const char * aContentType,
>- nsIInterfaceRequestor* aWindowContext, nsIRequest *request)
You didn't really have to reformat this... but I guess you could use
> NS_IMETHODIMP
> nsMsgComposeContentHandler::HandleContent(const char * aContentType,
> nsIInterfaceRequestor* aWindowContext,
> nsIRequest *request)
I don't really like your style of wrapping though.
>+ nsCOMPtr<nsIDOMWindow> window = do_GetInterface(aWindowContext);
>+ if (!window)
>+ return NS_ERROR_FAILURE;
>+
>+ nsCOMPtr<nsIDOMDocument> document;
>+ window->GetDocument(getter_AddRefs(document));
>+ nsAutoString documentURIString;
>+ document->GetDocumentURI(documentURIString);
This does seem a bit of a long-winded route but I'd have to ask bz what the most recommended way to get the referring URL is.
>+ nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
>+ nsCOMPtr<nsIURI> documentURI;
>+ rv = ioService->NewURI(NS_ConvertUTF16toUTF8(documentURIString),
>+ nsnull, nsnull, getter_AddRefs(documentURI));
NS_NewURI(getter_AddRefs(documentURI), documentURIString);
>+ NS_ENSURE_SUCCESS(rv,rv);
Nit: space after comma
>+ NS_ENSURE_SUCCESS(rv,rv);
>+ if (!msgHdr)
>+ return NS_ERROR_FAILURE;
[Do you really need both checks?]
Comment 35•13 years ago
|
||
Comment on attachment 543832 [details] [diff] [review]
Don't bail out when we can't get an identity
>+ nsCOMPtr<nsIDOMWindow> window = do_GetInterface(aWindowContext);
>+ if (!window)
>+ return NS_ERROR_FAILURE;
>+
>+ nsCOMPtr<nsIDOMDocument> document;
>+ window->GetDocument(getter_AddRefs(document));
>+ nsAutoString documentURIString;
>+ document->GetDocumentURI(documentURIString);
Looks like bz approves this, so sr=me with my other changes fixed.
Attachment #543832 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 36•13 years ago
|
||
Checked in with nits fixed: http://hg.mozilla.org/comm-central/rev/b65e94778dbd
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: Future → Thunderbird 8.0
Assignee | ||
Comment 37•13 years ago
|
||
Bustage fix for .eml messages: http://hg.mozilla.org/comm-central/rev/a6bdbe78f1f7
Comment 38•13 years ago
|
||
In this context I like to share, that TB's Help points to a pretty useless site: http://support.mozillamessaging.com/en-US/kb/configuration-options-accounts.
Nowhere I can find what "Set the default email account" really effects besides the fact, that the concerning account is shifted to the top position in the left pane of TB's main window.
Comment 40•12 years ago
|
||
Has there been a reintroduction of whatever caused this bug originally - it is not working for me now: Windows 7 64bit ; TB 18.0 (also on Daily)
I will check an older version to see if i can isolate when it was introduced...in the meantime perhaps it needs to be reopened?
Comment 41•12 years ago
|
||
I have now tried on TB rel 17 and I think I understand why it wasn't apparent before. I have moved the default outgoing email in the account list from the top to the bottom in the left hand side of the dialog for account settings. This happened because I needed to change the account type to IMAP and so needed to delete and re-add it. So basically it seems that unless the account is at the top of the list, setting the outgoing to default makes no difference
Comment 42•10 years ago
|
||
I just experienced this problem with 31.3.0
The link that caused it: <div><b>From:</b> "Tudor, Charles" <<a moz-do-not-send="true" href="mailto:example@example.com" target="_blank">example@example.com</a>><br>
Comment 43•3 years ago
|
||
This bug seems to have resurfaced in 91.2.0
When I click a mailTo or email address from my secondary account, it opens a new email to that address but from my default account.
You need to log in
before you can comment on or make changes to this bug.
Description
•