rem: messenger.saveAs(uri, false); 
add: { var folderTree = GetFolderTree(); var identity = null; var selectedFolderList = folderTree.selectedItems; if(selectedFolderList.length > 0) { var selectedFolder = selectedFolderList[0]; var folderUri = selectedFolder.getAttribute('id');    var server = FindIncomingServer(folderUri);   var identities = accountManager.GetIdentitiesForServer(server);   if (identities.Count() > 0 ) { identity = identities.GetElementAt(0).QueryInterface(Components.interfaces.nsIMsgIdentity); } } messenger.saveAs(uri, false, identity); } 
context: function MsgSaveAsTemplate() {  dump("\MsgSaveAsTemplate from XUL\n");  var tree = GetThreadTree();  //get the selected elements  var messageList = tree.selectedItems;  if (messageList && messageList.length == 1)  {      var uri = messageList[0].getAttribute('id');      dump (uri);      if (uri)          messenger.saveAs(uri, false);  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/9ddf01985751311047e4fc2a7e5590193d0c8215/widgetglue.js/clean/mailnews/base/resources/content/widgetglue.js