From 2faecee4103314c28e76e232a196c5ec69b8c730 Mon Sep 17 00:00:00 2001 From: "bugzilla%arlen.demon.co.uk" Date: Mon, 7 Nov 2005 22:58:03 +0000 Subject: [PATCH] Bug 312474 IMAP/RSS message headers not shown if there is no POP-mail account set up p=me r=mscott sr=bienvenu --- mail/base/content/msgHdrViewOverlay.js | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/mail/base/content/msgHdrViewOverlay.js b/mail/base/content/msgHdrViewOverlay.js index 89062f33961d..1c6fb05dc386 100644 --- a/mail/base/content/msgHdrViewOverlay.js +++ b/mail/base/content/msgHdrViewOverlay.js @@ -419,27 +419,27 @@ var messageHeaderSink = { if (msgHeaderParser && header.headerValue) fromMailbox = msgHeaderParser.extractHeaderAddressMailboxes(null, header.headerValue); - if (header.headerValue) { - if ((gCollectIncoming && !dontCollectAddress) || - (gCollectNewsgroup && dontCollectAddress)) + if (header.headerValue) + { + try { - if (!abAddressCollector) - abAddressCollector = Components.classes[abAddressCollectorContractID].getService(Components.interfaces.nsIAbAddressCollecter); + if (!dontCollectAddress && (gCollectIncoming || gCollectNewsgroup || gCollectOutgoing)) + { + if (!abAddressCollector) + abAddressCollector = Components.classes[abAddressCollectorContractID] + .getService(Components.interfaces.nsIAbAddressCollecter); - gCollectAddress = header.headerValue; - // collect, and add card if doesn't exist, unknown preferred send format - gCollectAddressTimer = setTimeout('abAddressCollector.collectUnicodeAddress(gCollectAddress, true, Components.interfaces.nsIAbPreferMailFormat.unknown);', 2000); + gCollectAddress = header.headerValue; + if (gCollectOutgoing) + // collect, but only update existing cards, unknown preferred send format + gCollectAddressTimer = setTimeout('abAddressCollector.collectUnicodeAddress(gCollectAddress, false, Components.interfaces.nsIAbPreferMailFormat.unknown);', 2000); + else + // collect, and add card if doesn't exist, unknown preferred send format + gCollectAddressTimer = setTimeout('abAddressCollector.collectUnicodeAddress(gCollectAddress, true, Components.interfaces.nsIAbPreferMailFormat.unknown);', 2000); + } } - else if (gCollectOutgoing) - { - if (!abAddressCollector) - abAddressCollector = Components.classes[abAddressCollectorContractID].getService(Components.interfaces.nsIAbAddressCollecter); - - // collect, but only update existing cards, unknown preferred send format - gCollectAddress = header.headerValue; - gCollectAddressTimer = setTimeout('abAddressCollector.collectUnicodeAddress(gCollectAddress, false, Components.interfaces.nsIAbPreferMailFormat.unknown);', 2000); - } - } + catch(ex) {} + } } // if lowerCaseHeaderName == "from" } // while we have more headers to parse