/* Get the list of from addresses. */
$addr = array();
foreach ($msgList as $mbox => $msgIndices) {
+ $GLOBALS['imp_imap']->checkUidvalidity($mbox);
+
foreach ($msgIndices as $idx) {
$contents = IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox);
$hdr = $contents->getHeaderOb();
* Reports a list of messages as spam, based on the local configuration
* parameters.
*
- * @param mixed $indices See IMP::parseIndicesList().
- * @param string $action Either 'spam' or 'notspam'.
+ * @param mixed $indices See IMP::parseIndicesList().
+ * @param string $action Either 'spam' or 'notspam'.
*
* @return integer 1 if messages have been deleted, 2 if messages have
* been moved.
$report_count = 0;
foreach ($msgList as $mbox => $msgIndices) {
+ try {
+ $GLOBALS['imp_imap']->checkUidvalidity($mbox);
+ } catch (Horde_Exception $e) {
+ continue;
+ }
+
foreach ($msgIndices as $idx) {
/* Fetch the raw message contents (headers and complete
* body). */
return $delete_spam;
}
+
}