remove unused aol pfc code, r/sr=neil, 530618
authorDavid Bienvenu <bienvenu@nventure.com>
Tue, 24 Nov 2009 10:26:14 -0800
changeset 4446 8e5f6abcd3a31d450b54b7e75f65397101fd2eb4
parent 4445 d6dab51ecb6954276f209fc3771ce5c61dc65a46
child 4447 c57a33c9ffbfc8a2d40236acb5881123388c1996
push id3475
push userbienvenu@nventure.com
push dateTue, 24 Nov 2009 18:26:20 +0000
treeherdercomm-central@8e5f6abcd3a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs530618
remove unused aol pfc code, r/sr=neil, 530618
mail/base/content/mailWindowOverlay.js
mail/locales/en-US/chrome/messenger/imapMsgs.properties
mailnews/imap/public/nsIImapIncomingServer.idl
mailnews/imap/src/nsImapIncomingServer.cpp
mailnews/imap/src/nsImapIncomingServer.h
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapStringBundle.h
suite/locales/en-US/chrome/mailnews/imapMsgs.properties
suite/mailnews/mailWindowOverlay.js
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -2803,41 +2803,16 @@ function OnMsgLoaded(aUrl)
     else // standalone msg window
     {
       MarkMessageAsRead(msgHdr);
     }
   }
 
   // See if MDN was requested but has not been sent.
   HandleMDNResponse(aUrl);
-
-  if (!gFolderDisplay.selectedMessageIsImap)
-    return;
-
-  var imapServer = folder.server.QueryInterface(Components.interfaces.nsIImapIncomingServer);
-  if (imapServer.storeReadMailInPFC)
-  {
-    // Look in read mail PFC for msg with same msg id - if we find one,
-    // don't put this message in the read mail pfc.
-    var outputPFC = imapServer.GetReadMailPFC(true);
-
-    if (msgHdr && msgHdr.messageId.length > 0)
-    {
-      var readMailDB = outputPFC.msgDatabase;
-      if (readMailDB && readMailDB.getMsgHdrForMessageID(msgHdr.messageId))
-        return; // Don't copy to offline folder.
-    }
-
-    var messages = Components.classes["@mozilla.org/array;1"]
-                              .createInstance(Components.interfaces.nsIMutableArray);
-    messages.appendElement(msgHdr, false);
-    outputPFC.copyMessages(folder, messages, false /*isMove*/,
-                            msgWindow /*nsIMsgWindow*/, null /*listener*/,
-                            false /*isFolder*/, false /*allowUndo*/);
-  }
 }
 
 /**
  * This function handles all mdn response generation (ie, imap and pop).
  * For pop the msg uid can be 0 (ie, 1st msg in a local folder) so no
  * need to check uid here. No one seems to set mimeHeaders to null so
  * no need to check it either.
  */
--- a/mail/locales/en-US/chrome/messenger/imapMsgs.properties
+++ b/mail/locales/en-US/chrome/messenger/imapMsgs.properties
@@ -250,28 +250,16 @@ 5056=There are no new messages on the se
 ## @name IMAP_DEFAULT_ACCOUNT_NAME
 ## @loc None
 5057=Mail for %S
 
 ## @name IMAP_EMPTY_TRASH_CONFIRM
 ## @loc None
 5061=Emptying trash will delete %S and all of the messages it contains. Do you want to delete this folder?
 
-## @name IMAP_PERSONAL_FILING_CABINET
-## @loc None
-5062=Personal Filing Cabinet
-
-## @name IMAP_PFC_READ_MAIL
-## @loc None
-5063=Read Mail
-
-## @name IMAP_PFC_SENT_MAIL
-## @loc None
-5064=Sent Mail
-
 ## @name IMAP_SPECIAL_CHAR
 ## @loc None
 5065= The %c character is reserved on this imap server. Please choose another name. 
 
 ## @name IMAP_PERSONAL_SHARED_FOLDER_TYPE_NAME
 ## @loc None
 5066=Personal Folder
 
--- a/mailnews/imap/public/nsIImapIncomingServer.idl
+++ b/mailnews/imap/public/nsIImapIncomingServer.idl
@@ -50,17 +50,17 @@ typedef long nsMsgImapDeleteModel;
 [scriptable, uuid(bbfc33de-fe89-11d3-a564-0060b0fc04b7)]
 interface nsMsgImapDeleteModels
 {
   const long IMAPDelete = 0;    /* delete with a big red x */
   const long MoveToTrash = 1;   /* delete moves message to the trash */
   const long DeleteNoTrash = 2; /* delete is shift delete - don't create or use trash */
 };
 
-[scriptable, uuid(3b5ada31-561f-4a76-b1be-0b2bba8e9389)]
+[scriptable, uuid(fd8b94f8-c8dc-4595-a651-ecaa0f8a8e90)]
 interface nsIImapIncomingServer : nsISupports {
 
   attribute long maximumConnectionsNumber;
   attribute long timeOutLimits;
   attribute ACString adminUrl;
   attribute ACString serverDirectory;
   attribute long capabilityPref;
   attribute boolean cleanupInboxOnExit;
@@ -72,17 +72,16 @@ interface nsIImapIncomingServer : nsISup
   attribute ACString otherUsersNamespace;
   attribute boolean offlineDownload;
   attribute boolean overrideNamespaces;
   attribute boolean usingSubscription;
   attribute ACString manageMailAccountUrl;
   attribute boolean fetchByChunks;
   attribute boolean mimePartsOnDemand;
   attribute boolean isAOLServer;
-  attribute boolean aOLMailboxView;
   attribute boolean useIdle;
 
   /// Is this a GMail Server?
   attribute boolean isGMailServer;
 
   /**
    * See IMAP RFC 4551
    **/
@@ -90,18 +89,16 @@ interface nsIImapIncomingServer : nsISup
 
   /**
    * See IMAP RFC 4978
    */
   attribute boolean useCompressDeflate;
 
   attribute AString trashFolderName;
 
-  boolean getIsPFC(in ACString folderName);
-  nsIMsgFolder getPFC(in boolean createIfMissing);
   attribute boolean downloadBodiesOnGetNewMail;
   attribute boolean autoSyncOfflineStores;
 
   /// Max age of messages we will autosync to, or keep in offline store.
   attribute long autoSyncMaxAgeDays;
 
   void GetImapConnectionAndLoadUrl(in nsIEventTarget aClientEventTarget,
                                            in nsIImapUrl aImapUrl,
@@ -109,18 +106,16 @@ interface nsIImapIncomingServer : nsISup
 
   void RemoveConnection(in nsIImapProtocol aImapConnection);
   void ResetNamespaceReferences();
   void pseudoInterruptMsgLoad(in nsIMsgFolder aImapFolder, in nsIMsgWindow aMsgWindow, out boolean interrupted);
   void ResetConnection(in ACString folderName);
   void CloseConnectionForFolder(in nsIMsgFolder aMsgFolder);
   void reDiscoverAllFolders();
   nsIURI subscribeToFolder(in AString name, in boolean subscribe);
-  nsIMsgFolder GetReadMailPFC(in boolean createIfMissing);
-  nsIMsgFolder GetSentMailPFC(in boolean createIfMissing);
   void GetNewMessagesForNonInboxFolders(in nsIMsgFolder aRootFolder,
                                         in nsIMsgWindow aWindow,
                                         in boolean forceAllFolders,
                                         in boolean performingBiff);
   attribute boolean doingLsub;
 
   ACString getUriWithNamespacePrefixIfNecessary(in long namespaceType, in ACString originalUri);
   attribute boolean shuttingDown;
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -103,17 +103,16 @@ NS_INTERFACE_MAP_END_INHERITING(nsMsgInc
 
 nsImapIncomingServer::nsImapIncomingServer()
 {
   m_capability = kCapabilityUndefined;
   mDoingSubscribeDialog = PR_FALSE;
   mDoingLsub = PR_FALSE;
   m_canHaveFilters = PR_TRUE;
   m_userAuthenticated = PR_FALSE;
-  m_readPFCName = PR_FALSE;
   m_shuttingDown = PR_FALSE;
 }
 
 nsImapIncomingServer::~nsImapIncomingServer()
 {
   nsresult rv = ClearInner();
   NS_ASSERTION(NS_SUCCEEDED(rv), "ClearInner failed");
   CloseCachedConnections();
@@ -380,19 +379,16 @@ NS_IMPL_SERVERPREF_STR(nsImapIncomingSer
                        "namespace.other_users")
 
 NS_IMPL_SERVERPREF_BOOL(nsImapIncomingServer, FetchByChunks,
                        "fetch_by_chunks")
 
 NS_IMPL_SERVERPREF_BOOL(nsImapIncomingServer, MimePartsOnDemand,
                        "mime_parts_on_demand")
 
-NS_IMPL_SERVERPREF_BOOL(nsImapIncomingServer, AOLMailboxView,
-                       "aol_mailbox_view")
-
 NS_IMETHODIMP
 nsImapIncomingServer::GetIsAOLServer(PRBool *aBool)
 {
   NS_ENSURE_ARG_POINTER(aBool);
   *aBool = ((m_capability & kAOLImapCapability) != 0);
   return NS_OK;
 }
 
@@ -1003,109 +999,16 @@ nsImapIncomingServer::CloseCachedConnect
     if (connection)
       connection->TellThreadToDie(PR_TRUE);
   }
 
   PR_CExitMonitor(this);
   return NS_OK;
 }
 
-void nsImapIncomingServer::GetPFCName(nsACString& aPfcname)
-{
-  if (!m_readPFCName)
-  {
-    if(NS_SUCCEEDED(GetStringBundle()))
-    {
-      nsAutoString pfcName;
-      nsresult res = m_stringBundle->GetStringFromID(IMAP_PERSONAL_FILING_CABINET, getter_Copies(pfcName));
-      if (NS_SUCCEEDED(res))
-        CopyUTF16toUTF8(pfcName, m_pfcName);
-    }
-    m_readPFCName = PR_TRUE;
-  }
-  aPfcname = m_pfcName;
-  return;
-}
-
-NS_IMETHODIMP nsImapIncomingServer::GetIsPFC(const nsACString& folderName, PRBool *result)
-{
-  NS_ENSURE_ARG(result);
-  nsCString pfcName;
-  GetPFCName(pfcName);
-  *result = folderName.Equals(pfcName);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsImapIncomingServer::GetPFC(PRBool createIfMissing, nsIMsgFolder **pfcFolder)
-{
-  nsresult rv;
-  nsCOMPtr<nsIMsgAccountManager> accountManager =
-           do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
-  if (NS_SUCCEEDED(rv))
-  {
-    nsCOMPtr <nsIMsgIncomingServer> server;
-    rv = accountManager->GetLocalFoldersServer(getter_AddRefs(server));
-    if (NS_SUCCEEDED(rv) && server)
-      return server->GetRootMsgFolder(pfcFolder);
-  }
-  return rv;
-}
-
-nsresult nsImapIncomingServer::GetPFCForStringId(PRBool createIfMissing, PRInt32 stringId, nsIMsgFolder **aFolder)
-{
-  NS_ENSURE_ARG_POINTER(aFolder);
-  nsCOMPtr <nsIMsgFolder> pfcParent;
-
-  nsresult rv = GetPFC(createIfMissing, getter_AddRefs(pfcParent));
-  NS_ENSURE_SUCCESS(rv, rv);
-  nsCString pfcURI;
-  pfcParent->GetURI(pfcURI);
-
-  rv = GetStringBundle();
-  NS_ENSURE_SUCCESS(rv, rv);
-  nsAutoString pfcName;
-  rv = m_stringBundle->GetStringFromID(stringId, getter_Copies(pfcName));
-  NS_ENSURE_SUCCESS(rv, rv);
-  nsCAutoString pfcMailUri(pfcURI);
-//  pfcMailUri.Append(".sbd");
-  pfcMailUri.Append('/');
-  AppendUTF16toUTF8(pfcName, pfcMailUri);
-  pfcParent->GetChildWithURI(pfcMailUri, PR_FALSE, PR_FALSE /* caseInsensitive*/, aFolder);
-  if (!*aFolder && createIfMissing)
-  {
-    // get the URI from the incoming server
-    nsCOMPtr<nsIRDFService> rdf = do_GetService("@mozilla.org/rdf/rdf-service;1", &rv);
-    NS_ENSURE_SUCCESS(rv,rv);
-
-    nsCOMPtr<nsIRDFResource> res;
-    rv = rdf->GetResource(pfcMailUri, getter_AddRefs(res));
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    nsCOMPtr <nsIMsgFolder> parentToCreate = do_QueryInterface(res, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    parentToCreate->SetParent(pfcParent);
-    parentToCreate->CreateStorageIfMissing(nsnull);
-    NS_IF_ADDREF(*aFolder = parentToCreate);
-  }
-  return rv;
-}
-
-NS_IMETHODIMP nsImapIncomingServer::GetReadMailPFC(PRBool createIfMissing, nsIMsgFolder **aFolder)
-{
-  NS_ENSURE_ARG_POINTER(aFolder);
-  return GetPFCForStringId(createIfMissing, IMAP_PFC_READ_MAIL, aFolder);
-}
-
-NS_IMETHODIMP nsImapIncomingServer::GetSentMailPFC(PRBool createIfMissing, nsIMsgFolder **aFolder)
-{
-  NS_ENSURE_ARG_POINTER(aFolder);
-  return GetPFCForStringId(createIfMissing, IMAP_PFC_SENT_MAIL, aFolder);
-}
-
 nsresult
 nsImapIncomingServer::CreateRootFolderFromUri(const nsCString &serverUri,
                                               nsIMsgFolder **rootFolder)
 {
   nsImapMailFolder *newRootFolder = new nsImapMailFolder;
   if (!newRootFolder)
     return NS_ERROR_OUT_OF_MEMORY;
   newRootFolder->Init(serverUri.get());
--- a/mailnews/imap/src/nsImapIncomingServer.h
+++ b/mailnews/imap/src/nsImapIncomingServer.h
@@ -111,18 +111,16 @@ protected:
   void GetUnverifiedFolders(nsCOMArray<nsIMsgImapMailFolder> &aFolderArray);
   nsresult DeleteNonVerifiedFolders(nsIMsgFolder *parentFolder);
   PRBool NoDescendentsAreVerified(nsIMsgFolder *parentFolder);
   PRBool AllDescendentsAreNoSelect(nsIMsgFolder *parentFolder);
 
   nsresult GetStringBundle();
   nsString GetImapStringByName(const nsString &aName);
 
-  void     GetPFCName(nsACString&); 
-  nsresult GetPFCForStringId(PRBool createIfMissing, PRInt32 stringId, nsIMsgFolder **aFolder);
 private:
   nsresult SubscribeToFolder(const PRUnichar *aName, PRBool subscribe);
   nsresult GetImapConnection (nsIEventTarget* aEventTarget,
                                    nsIImapUrl* aImapUrl,
                                    nsIImapProtocol** aImapConnection);
   nsresult CreateProtocolInstance(nsIEventTarget *aEventTarget,
                                            nsIImapProtocol ** aImapConnection);
   nsresult CreateHostSpecificPrefName(const char *prefPrefix, nsCAutoString &prefName);
@@ -137,22 +135,20 @@ private:
   nsCOMArray<nsIImapProtocol> m_connectionCache;
   nsCOMArray<nsIImapUrl> m_urlQueue;
   nsCOMPtr<nsIStringBundle>	m_stringBundle;
   nsCOMArray<nsIMsgFolder> m_subscribeFolders; // used to keep folder resources around while subscribe UI is up.
   nsCOMArray<nsIMsgImapMailFolder> m_foldersToStat; // folders to check for new mail with Status
   nsVoidArray       m_urlConsumers;
   PRUint32          m_capability;
   nsCString         m_manageMailAccountUrl;
-  PRPackedBool      m_readPFCName;
   PRPackedBool      m_userAuthenticated;
   PRPackedBool      mDoingSubscribeDialog;
   PRPackedBool      mDoingLsub;
   PRPackedBool      m_shuttingDown;
-  nsCString         m_pfcName;
 
   // subscribe dialog stuff
   nsresult AddFolderToSubscribeDialog(const char *parentUri, const char *uri,const char *folderName);
   nsCOMPtr <nsISubscribableServer> mInner;
   nsresult EnsureInner();
   nsresult ClearInner();
 };
 
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -476,26 +476,19 @@ nsresult nsImapMailFolder::AddSubfolderW
 
 nsresult nsImapMailFolder::CreateSubFolders(nsILocalFile *path)
 {
   nsresult rv = NS_OK;
   nsAutoString currentFolderNameStr;    // online name
   nsAutoString currentFolderDBNameStr;  // possibly munged name
   nsCOMPtr<nsIMsgFolder> child;
   nsCOMPtr<nsIMsgIncomingServer> server;
-  nsCOMPtr<nsIImapIncomingServer> imapServer;
   rv = GetServer(getter_AddRefs(server));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  imapServer = do_QueryInterface(server, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  PRBool isServer;
-  rv = GetIsServer(&isServer);
-
   nsCAutoString folderName;
   nsCOMPtr <nsISimpleEnumerator> children;
   rv = path->GetDirectoryEntries(getter_AddRefs(children));
   PRBool more = PR_FALSE;
   if (children)
     children->HasMoreElements(&more);
   nsCOMPtr<nsIFile> dirEntry;
 
@@ -505,28 +498,16 @@ nsresult nsImapMailFolder::CreateSubFold
     if (NS_FAILED(rv))
       break;
     rv = children->HasMoreElements(&more);
     if (NS_FAILED(rv)) return rv;
 
     nsCOMPtr <nsILocalFile> currentFolderPath = do_QueryInterface(dirEntry);
     currentFolderPath->GetNativeLeafName(folderName);
     NS_CopyNativeToUnicode(folderName, currentFolderNameStr);
-    if (isServer && imapServer)
-    {
-      PRBool isPFC;
-      imapServer->GetIsPFC(folderName, &isPFC);
-      if (isPFC)
-      {
-        nsCOMPtr <nsIMsgFolder> pfcFolder;
-        imapServer->GetPFC(PR_TRUE, getter_AddRefs(pfcFolder));
-        continue;
-      }
-      // should check if this is the PFC
-    }
     if (nsShouldIgnoreFile(currentFolderNameStr))
       continue;
 
     // OK, here we need to get the online name from the folder cache if we can.
     // If we can, use that to create the sub-folder
     nsCOMPtr <nsIMsgFolderCacheElement> cacheElement;
     nsCOMPtr <nsILocalFile> curFolder = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -32,17 +32,16 @@
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
-#define DOING_PSEUDO_MAILBOXES
 
 #ifdef MOZ_LOGGING
 // sorry, this has to be before the pre-compiled header
 #define FORCE_PR_LOG /* Allow logging in the release build */
 #endif
 
 // as does this
 #include "msgCore.h"  // for pre-compiled headers
--- a/mailnews/imap/src/nsImapStringBundle.h
+++ b/mailnews/imap/src/nsImapStringBundle.h
@@ -83,19 +83,16 @@ PR_END_EXTERN_C
 #define IMAP_DONE				5050
 #define IMAP_ENTER_PASSWORD_PROMPT_TITLE	5051
 #define IMAP_UNKNOWN_HOST_ERROR			5052
 #define IMAP_CONNECTION_REFUSED_ERROR               5053
 #define IMAP_NET_TIMEOUT_ERROR                      5054
 #define IMAP_NO_NEW_MESSAGES                        5056
 #define IMAP_DEFAULT_ACCOUNT_NAME                   5057
 #define IMAP_EMPTY_TRASH_CONFIRM                    5061
-#define IMAP_PERSONAL_FILING_CABINET                5062
-#define IMAP_PFC_READ_MAIL                          5063
-#define IMAP_PFC_SENT_MAIL                          5064
 #define IMAP_SPECIAL_CHAR                           5065
 #define IMAP_PERSONAL_SHARED_FOLDER_TYPE_NAME       5066
 #define IMAP_PUBLIC_FOLDER_TYPE_NAME                5067
 #define IMAP_OTHER_USERS_FOLDER_TYPE_NAME           5068
 #define IMAP_PERSONAL_FOLDER_TYPE_DESCRIPTION       5069
 #define IMAP_PERSONAL_SHARED_FOLDER_TYPE_DESCRIPTION 5070
 #define IMAP_PUBLIC_FOLDER_TYPE_DESCRIPTION         5071
 #define IMAP_OTHER_USERS_FOLDER_TYPE_DESCRIPTION    5072
--- a/suite/locales/en-US/chrome/mailnews/imapMsgs.properties
+++ b/suite/locales/en-US/chrome/mailnews/imapMsgs.properties
@@ -250,28 +250,16 @@ 5056=There are no new messages on the se
 ## @name IMAP_DEFAULT_ACCOUNT_NAME
 ## @loc None
 5057=Mail for %S
 
 ## @name IMAP_EMPTY_TRASH_CONFIRM
 ## @loc None
 5061=Emptying trash will delete %S and all of the messages it contains. Do you want to delete this folder?
 
-## @name IMAP_PERSONAL_FILING_CABINET
-## @loc None
-5062=Personal Filing Cabinet
-
-## @name IMAP_PFC_READ_MAIL
-## @loc None
-5063=Read Mail
-
-## @name IMAP_PFC_SENT_MAIL
-## @loc None
-5064=Sent Mail
-
 ## @name IMAP_SPECIAL_CHAR
 ## @loc None
 5065= The %c character is reserved on this imap server. Please choose another name. 
 
 ## @name IMAP_PERSONAL_SHARED_FOLDER_TYPE_NAME
 ## @loc None
 5066=Personal Folder
 
--- a/suite/mailnews/mailWindowOverlay.js
+++ b/suite/mailnews/mailWindowOverlay.js
@@ -2844,55 +2844,16 @@ function OnMsgLoaded(aUrl)
       else // standalone msg window
       {
         MarkMessageAsRead(msgHdr);
       }
     }
 
     // See if MDN was requested but has not been sent.
     HandleMDNResponse(aUrl);
-
-    var currentMsgFolder = folder.QueryInterface(Components.interfaces.nsIMsgFolder);
-    if (!IsImapMessage(msgURI))
-      return;
-
-    var imapServer = currentMsgFolder.server.QueryInterface(Components.interfaces.nsIImapIncomingServer);
-    var storeReadMailInPFC = imapServer.storeReadMailInPFC;
-    if (storeReadMailInPFC)
-    {
-      var messageID;
-
-      var copyToOfflineFolder = true;
-
-      // look in read mail PFC for msg with same msg id - if we find one,
-      // don't put this message in the read mail pfc.
-      var outputPFC = imapServer.GetReadMailPFC(true);
-
-      if (msgHdr)
-      {
-        messageID = msgHdr.messageId;
-        if (messageID.length > 0)
-        {
-          var readMailDB = outputPFC.msgDatabase;
-          if (readMailDB)
-          {
-            var hdrInDestDB = readMailDB.getMsgHdrForMessageID(messageID);
-            if (hdrInDestDB)
-              copyToOfflineFolder = false;
-          }
-        }
-      }
-      if (copyToOfflineFolder)
-      {
-        var messages = Components.classes["@mozilla.org/array;1"].createInstance(Components.interfaces.nsIMutableArray);
-        messages.appendElement(msgHdr, false);
-
-        res = outputPFC.copyMessages(currentMsgFolder, messages, false /*isMove*/, msgWindow /* nsIMsgWindow */, null /* listener */, false /* isFolder */, false /*allowUndo*/ );
-      }
-     }
 }
 
 //
 // This function handles all mdn response generation (ie, imap and pop).
 // For pop the msg uid can be 0 (ie, 1st msg in a local folder) so no
 // need to check uid here. No one seems to set mimeHeaders to null so
 // no need to check it either.
 //