diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 963853bc874..4176f3fd51c 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -6482,6 +6482,7 @@ nsImapMailFolder::CopyMessages(nsIMsgFolder* srcFolder, nsCOMPtr msgDBHdr = do_QueryElementAt(messages, i, &rv); if (mDatabase && msgDBHdr) { + nsMsgLabelValue label; nsXPIDLCString junkScore, junkScoreOrigin; msgDBHdr->GetStringProperty("junkscore", getter_Copies(junkScore)); msgDBHdr->GetStringProperty("junkscoreorigin", getter_Copies(junkScoreOrigin)); @@ -6489,6 +6490,13 @@ nsImapMailFolder::CopyMessages(nsIMsgFolder* srcFolder, mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "junkscore", junkScore.get(), 0); if (!junkScoreOrigin.IsEmpty()) mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "junkscoreorigin", junkScore.get(), 0); + msgDBHdr->GetLabel(&label); + if (label != 0) + { + nsCAutoString labelStr; + labelStr.AppendInt(label); + mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "label", labelStr.get(), 0); + } } } }