context: function DetermineHTMLAction(convertible){    var obj;    if (! gMsgCompose.composeHTML)    {        try {            obj = new Object;            gMsgCompose.CheckAndPopulateRecipients(true, false, obj);        } catch(ex) { dump("gMsgCompose.CheckAndPopulateRecipients failed: " + ex + "\n"); }        return nsIMsgCompSendFormat.PlainText;    }    if (gSendFormat == nsIMsgCompSendFormat.AskUser)    {        //Well, before we ask, see if we can figure out what to do for ourselves        var noHtmlRecipients;        var noHtmlnewsgroups;        var preferFormat;        //Check the address book for the HTML property for each recipient        try {            obj = new Object;            preferFormat = gMsgCompose.CheckAndPopulateRecipients(true, true, obj);            noHtmlRecipients = obj.value;        } catch(ex)        {            dump("gMsgCompose.CheckAndPopulateRecipients failed: " + ex + "\n");            var msgCompFields = gMsgCompose.compFields;            noHtmlRecipients = msgCompFields.to + "," + msgCompFields.cc + "," + msgCompFields.bcc;            preferFormat = nsIAbPreferMailFormat.unknown;        }        dump("DetermineHTMLAction: preferFormat = " + preferFormat + ", noHtmlRecipients are " + noHtmlRecipients + "\n");        //Check newsgroups now...        noHtmlnewsgroups = gMsgCompose.compFields.newsgroups;                if (noHtmlRecipients != "" || noHtmlnewsgroups != "")        {            if (convertible == nsIMsgCompConvertible.Plain)              return nsIMsgCompSendFormat.PlainText;            if (noHtmlnewsgroups == "")            {                switch (preferFormat)                {                  case nsIAbPreferMailFormat.plaintext :                    return nsIMsgCompSendFormat.PlainText;                  default :                    //See if a preference has been set to tell us what to do. Note that we do not honor that                    //preference for newsgroups. Only for e-mail addresses.                    var action = sPrefs.getIntPref("mail.default_html_action");                    switch (action)                    {                        case nsIMsgCompSendFormat.PlainText    :                        case nsIMsgCompSendFormat.HTML         :                        case nsIMsgCompSendFormat.Both         :                            return action;                    }                }            }            return nsIMsgCompSendFormat.AskUser;        }        else            return nsIMsgCompSendFormat.HTML;    }    else    {      try {                       obj = new Object;                       gMsgCompose.CheckAndPopulateRecipients(true, false, obj);      } catch(ex) { dump("gMsgCompose.CheckAndPopulateRecipients failed: " + ex + "\n"); }    }    return gSendFormat;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/b28a23f916d89e92ee63fd5dbae32f50da4a87ce/MsgComposeCommands.js/clean/mailnews/compose/resources/content/MsgComposeCommands.js