for (var j = startIndex.value; j <= endIndex.value; j++) {
var level = view.getLevel(j);
// as of now, 8/2002, we are not worried about groups.
if (level == 1) {
var buddyResource = GetBuddyResource(tree, j);
var buddyName = GetBuddyAttribute(tree, buddyResource, "ScreenName");
var buddyEmail = aimFeedbagManager().GetEmailId(buddyName);
// MERC: SL - sanity check on buddyEmail
if (buddyEmail == null) {
buddyEmail = " ";
}
if (!validateEmailAddress(buddyEmail)) {
buddyEmail=" ";
}
if (buddyEmail && buddyEmail != "") {
if (email)
email = email + "," + buddyEmail;
else
email = buddyEmail;
}
}
}
}
// openMailCompose(email); // MERC: SL
// MERC: SL - snippet stolen from browser.js
// generate a mailto url based on the url and the url's title
var mailtoUrl = "mailto:" + buddyEmail;
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI(mailtoUrl, null, null);
var extProtocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].getService(Components.interfaces.nsIExternalProtocolService);