The default bug view has changed. See this FAQ.

email autocomplete always adds "@localdomain" to addresses

VERIFIED FIXED in seamonkey1.0alpha

Status

SeaMonkey
MailNews: Message Display
VERIFIED FIXED
12 years ago
10 years ago

People

(Reporter: Ian Neal, Assigned: Ian Neal)

Tracking

Trunk
seamonkey1.0alpha

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

12 years ago
This does the mailnews equivalents of the TB parts of bug 93453 and bug 294107
(Assignee)

Comment 1

12 years ago
Created attachment 183576 [details] [diff] [review]
Patch v0.1

This patch:
* Adds the JS to make use of the new prefs introduced in bug 93453 and altered
in bug 294107
* Adds pref/account settings for the new prefs above
* Updates help to reflect the new pref/account settings
(Assignee)

Updated

12 years ago
Assignee: mail → bugzilla
Status: NEW → ASSIGNED
Attachment #183576 - Flags: review?(mnyromyr)

Comment 2

12 years ago
BTW: Neil was thinking of another method to solve this problem, maybe you should
talk to him.

Comment 3

12 years ago
Comment on attachment 183576 [details] [diff] [review]
Patch v0.1

>Index: mailnews/base/prefs/resources/locale/en-US/am-addressing.dtd
>===================================================================
>+<!ENTITY autocompleteToMyDomain.label     "Automatically complete addresses with my domain">

Hm, this sounds somewhat ambiguous. Is my domain used as the completion or are
addresses with my domain automatically completed and, if so, to what? (The
former, I know.)
How about "Automatically append my domain to addresses" or something (better)
like that?

>Index: mailnews/compose/resources/content/MsgComposeCommands.js
>===================================================================
> function setDomainName()
> {
>-  var emailAddr = gCurrentIdentity.email;
>-  var start = emailAddr.lastIndexOf("@");
>-  gAutocompleteSession.defaultDomain = emailAddr.slice(start + 1, emailAddr.length);
>+  if (gCurrentIdentity.autocompleteToMyDomain)
>+  {
>+    var emailAddr = gCurrentIdentity.email;
>+    var start = emailAddr.lastIndexOf("@");
>+    gAutocompleteSession.defaultDomain = emailAddr.slice(start + 1, emailAddr.length);
>+  }
> }

This has issues with recycled compose windows (thus minussing).
As soon as you stumble upon an account with autocompletion turned on, that
settings sticks with the compose window. Any subsequent compose window with
autocompletion turned _off_ will still use the last autocompletion domain!
(And the 2nd argument to String.slice is not needed here, btw).

>+          if (sPrefs.getBoolPref("mail.autoComplete.highlightNonMatches"))
>+            document.getElementById('addressCol2#1').highlightNonMatches = true;
>+

This is pretty useless without any supporting styles like those used by TB, eg.
<http://lxr.mozilla.org/mozilla/source/mail/themes/pinstripe/mail/compose/messe
ngercompose.css#407>.
Attachment #183576 - Flags: review?(mnyromyr) → review-
(Assignee)

Comment 4

12 years ago
Created attachment 183777 [details] [diff] [review]
Updated Patch v0.1a

Changes since v0.1:
* Updated account pref label as per review
* Empties default domain when autocompleteToMyDomain is false
* Add css for highlight pref
Attachment #183576 - Attachment is obsolete: true
Attachment #183777 - Flags: review?(mnyromyr)

Comment 5

12 years ago
Comment on attachment 183777 [details] [diff] [review]
Updated Patch v0.1a

>Index: mailnews/compose/resources/content/MsgComposeCommands.js
>===================================================================
>+function CheckValidEmailAddress(to, cc, bcc)

Since most of this file is violating the Mozilla naming guidelines, these
function arguments are in fact following the prevalent style (but I'm not quite
happy with that)...

Anyway, I found another issue:
If you have @local turned off and enter an address part that is matched by only
2 addressbook entries, the address popup isn't shown, because it has the
minResultsForPopup property of the respective textbox set to 3...
This should be 2 in this case (only), probably in setupAutocomplete. (eg.
http://lxr.mozilla.org/mozilla/source/mailnews/compose/resources/content/MsgCom
poseCommands.js#1017 for LDAP)
Attachment #183777 - Flags: review?(mnyromyr) → review-
(Assignee)

Comment 6

12 years ago
Created attachment 183953 [details] [diff] [review]
Revised Patch v0.1b (Checked in)

Changes since v0.1a: (as per reviewer's request)
* Added a reduction to minResultsForPopup for when autocompleteToMyDomain is
off
* Changed arguments to aTo, aCC and aBCC for CheckValidEmailAddress function
Attachment #183777 - Attachment is obsolete: true
Attachment #183953 - Flags: review?(mnyromyr)

Comment 7

12 years ago
Comment on attachment 183953 [details] [diff] [review]
Revised Patch v0.1b (Checked in)

>Index: mailnews/compose/resources/content/MsgComposeCommands.js
>===================================================================
>+      // When autocompleteToMyDomain is off there is no default entry with the domain
>+      // appended so reduce the minimum results for a popup to 2 in this case.

I feel a certain lack of commas here, but that may just be me. ;-)
Attachment #183953 - Flags: review?(mnyromyr) → review+
(Assignee)

Updated

12 years ago
Attachment #183953 - Flags: superreview?(neil.parkwaycc.co.uk)
(Assignee)

Comment 8

12 years ago
(In reply to comment #7)
> (From update of attachment 183953 [details] [diff] [review] [edit])
> >Index: mailnews/compose/resources/content/MsgComposeCommands.js
> >===================================================================
> >+      // When autocompleteToMyDomain is off there is no default entry with
the domain
> >+      // appended so reduce the minimum results for a popup to 2 in this case.
> 
> I feel a certain lack of commas here, but that may just be me. ;-)
> 
I will add commas before checkin :-)
(Assignee)

Comment 9

12 years ago
Comment on attachment 183953 [details] [diff] [review]
Revised Patch v0.1b (Checked in)

Rqeuesting sr from David as he wrote the patch for TB and should know the code.
Attachment #183953 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview?(bienvenu)

Updated

12 years ago
Attachment #183953 - Flags: superreview?(bienvenu) → superreview+
(Assignee)

Comment 10

12 years ago
Comment on attachment 183953 [details] [diff] [review]
Revised Patch v0.1b (Checked in)

Requesting approval for fairly low risk, suite-only patch which has been in TB
for a while now.
Attachment #183953 - Flags: approval1.8b3?

Updated

12 years ago
Attachment #183953 - Flags: approval1.8b3? → approval1.8b4+
(Assignee)

Comment 11

12 years ago
Comment on attachment 183953 [details] [diff] [review]
Revised Patch v0.1b (Checked in)

Checking in
extensions/help/resources/locale/en-US/mail_help.xhtml;
new revision: 1.61; previous revision: 1.60
mailnews/addrbook/prefs/resources/content/pref-addressing.xul;
new revision: 1.55; previous revision: 1.54
mailnews/addrbook/prefs/resources/locale/en-US/pref-addressing.dtd;
new revision: 1.19; previous revision: 1.18
mailnews/base/prefs/resources/content/am-addressingOverlay.xul;
new revision: 1.5; previous revision: 1.4
mailnews/base/prefs/resources/locale/en-US/am-addressing.dtd;
new revision: 1.8; previous revision: 1.7
mailnews/compose/resources/content/MsgComposeCommands.js;
new revision: 1.367; previous revision: 1.366
mailnews/compose/resources/locale/en-US/composeMsgs.properties;
new revision: 1.80; previous revision: 1.79
themes/classic/messenger/addressingWidget.css;
new revision: 1.5; previous revision: 1.4
themes/modern/messenger/addressingWidget.css;
new revision: 1.6; previous revision: 1.5
done
Attachment #183953 - Attachment description: Revised Patch v0.1b → Revised Patch v0.1b (Checked in)
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(In reply to comment #11)
> (From update of attachment 183953 [details] [diff] [review] [edit])
> extensions/help/resources/locale/en-US/mail_help.xhtml;
> new revision: 1.61; previous revision: 1.60

nit:
{{
Select this if you want to Mail &amp; Newsgroups to automatically [...]
[...]       If you want Mail &amp; Newsgroups to highlight [...]
}}
Isn't there a 'to' to remove/add !?
Target Milestone: --- → Seamonkey1.0alpha
(Assignee)

Comment 13

12 years ago
Created attachment 189282 [details] [diff] [review]
Fix typo patch (Checked in)

Corrects typo found in comment above
(Assignee)

Updated

12 years ago
Attachment #189282 - Flags: review?(kairo)

Updated

12 years ago
Attachment #189282 - Flags: review?(kairo) → review+
(Assignee)

Comment 14

12 years ago
Comment on attachment 189282 [details] [diff] [review]
Fix typo patch (Checked in)

Requesting a= for very simple typo fix
Attachment #189282 - Flags: approval1.8b4?
Attachment #189282 - Flags: approval1.8b4? → approval1.8b4+
(Assignee)

Comment 15

12 years ago
Comment on attachment 189282 [details] [diff] [review]
Fix typo patch (Checked in)

Checking in mail_help.xhtml;
new revision: 1.62; previous revision: 1.61
done
Attachment #189282 - Attachment description: Fix typo patch → Fix typo patch (Checked in)

Comment 16

12 years ago
I think this broke the Compositions &  Addressing panel in Thunderbird's account
Wizard. I get a entity error in today's build.  

Comment 17

12 years ago
Created attachment 189448 [details] [diff] [review]
fix thunderbird bustage (Checked in)

Fixes the thunderbird bustage by not including the new piece of UI in
thunderbird.   We're not interested in exposing this setting via the account
settings UI for thunderbird anyway so this works better than fixing the string
entity.
Attachment #189448 - Flags: superreview?(bienvenu)

Updated

12 years ago
Attachment #189448 - Flags: superreview?(bienvenu) → superreview+

Comment 18

12 years ago
Comment on attachment 189448 [details] [diff] [review]
fix thunderbird bustage (Checked in)

I checked in the fix for the thunderbird bustage.
Attachment #189448 - Attachment description: fix thunderbird bustage → fix thunderbird bustage (Checked in)
Verified FIXED on trunk using both SeaMonkey 1.5a;Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060104 Mozilla/1.0 and Thunderbird version 1.6a1 (20060103).

I verified that on Thunderbird, we don't add the user's domain by default, and that there is no such UI exposed to enable it.
Status: RESOLVED → VERIFIED

Updated

11 years ago
Blocks: 360488

Updated

10 years ago
No longer blocks: 360488
You need to log in before you can comment on or make changes to this bug.