rem: var session = Components.classes["component: 
add: var session = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession); 
context: function LoadIdentity(startup){    var identityElement = document.getElementById("msgIdentity");        var prevIdentity = currentIdentity;        if (identityElement) {        var item = identityElement.selectedItem;        var idKey = item.getAttribute('id');        currentIdentity = accountManager.getIdentity(idKey);        if (!startup && prevIdentity && idKey != prevIdentity.key)        {          var prevReplyTo = prevIdentity.replyTo;          var prevBcc = "";          if (prevIdentity.bccSelf)            prevBcc += prevIdentity.email;          if (prevIdentity.bccOthers)          {            if (prevBcc != "")              prevBcc += ","            prevBcc += prevIdentity.bccList;           }                    var newReplyTo = currentIdentity.replyTo;          var newBcc = "";          if (currentIdentity.bccSelf)            newBcc += currentIdentity.email;          if (currentIdentity.bccOthers)          {            if (newBcc != "")              newBcc += ","            newBcc += currentIdentity.bccList;           }          var needToCleanUp = false;          var msgCompFields = msgCompose.compFields;          if (newReplyTo != prevReplyTo)          {            needToCleanUp = true;            if (prevReplyTo != "")              awRemoveRecipients(msgCompFields, "addr_reply", prevReplyTo);            if (newReplyTo != "")              awAddRecipients(msgCompFields, "addr_reply", newReplyTo);          }                    if (newBcc != prevBcc)          {            needToCleanUp = true;            if (prevBcc != "")              awRemoveRecipients(msgCompFields, "addr_bcc", prevBcc);            if (newReplyTo != "")              awAddRecipients(msgCompFields, "addr_bcc", newBcc);          }                              if (needToCleanUp)            awCleanupRows();          try {            msgCompose.SetSignature(currentIdentity);          } catch (ex) { dump("### Cannot set the signature: " + ex + "\n");}        }                //Setup autocomplete session, we can doit from here as it's use as a service        var session = Components.classes["component://netscape/autocompleteSession&type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession);        if (session)        {            var emailAddr = currentIdentity.email;            var start = emailAddr.lastIndexOf("@");            session.defaultDomain = emailAddr.slice(start + 1, emailAddr.length);        }    }   }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0257791053c2b38e1dfaf2ee11afae973e82e394/MsgComposeCommands.js/clean/mailnews/compose/resources/content/MsgComposeCommands.js