context: function HandleMDNResponse(aUrl){  if (!aUrl)    return;  var msgFolder = aUrl.folder;  var msgURI = GetLoadedMessage();  if (!msgFolder || !msgURI)    return;	if (IsNewsMessage(msgURI))		return;  // if the message is marked as junk, do NOT attempt to process a return receipt  // in order to better protect the user  if (SelectedMessagesAreJunk())    return;  var msgHdr = messenger.msgHdrFromURI(msgURI);  var mimeHdr;  try {    mimeHdr = aUrl.mimeHeaders;  } catch (ex) {    return;  }  // If we didn't get the message id when we downloaded the message header,  // we cons up an md5: message id. If we've done that, we'll try to extract  // the message id out of the mime headers for the whole message.  var msgId = msgHdr.messageId;  if (msgId.split(":")[0] == "md5")  {    var mimeMsgId = mimeHdr.extractHeader("Message-Id", false);    if (mimeMsgId)      msgHdr.messageId = mimeMsgId;  }    // After a msg is downloaded it's already marked READ at this point so we must check if  // the msg has a "Disposition-Notification-To" header and no MDN report has been sent yet.  var msgFlags = msgHdr.flags;  if ((msgFlags & MSG_FLAG_IMAP_DELETED) || (msgFlags & MSG_FLAG_MDN_REPORT_SENT))    return;  var DNTHeader = mimeHdr.extractHeader("Disposition-Notification-To", false);  var oldDNTHeader = mimeHdr.extractHeader("Return-Receipt-To", false);  if (!DNTHeader && !oldDNTHeader)    return;   // Everything looks good so far, let's generate the MDN response.  var mdnGenerator = Components.classes["@mozilla.org/messenger-mdn/generator;1"].                                  createInstance(Components.interfaces.nsIMsgMdnGenerator);  mdnGenerator.process(MDN_DISPOSE_TYPE_DISPLAYED, msgWindow, msgFolder, msgHdr.messageKey, mimeHdr, false);  // Reset mark msg MDN "Sent" and "Not Needed".  msgHdr.flags = (msgFlags & ~MSG_FLAG_MDN_REPORT_NEEDED);  msgHdr.OrFlags(MSG_FLAG_MDN_REPORT_SENT);  // Commit db changes.  var msgdb = msgFolder.getMsgDatabase(msgWindow);  if (msgdb)    msgdb.Commit(MSG_DB_LARGE_COMMIT);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1f006be165cd5b0edd954d73be381a3433ad6883/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js