From 0b1cd826b05b6ec9637e373735967a2555eeb1d4 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 29 Sep 2015 11:48:41 +0200 Subject: do not store a recalled mail if we can not find the original mid --- include/items.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 7793d1fb2..ccc327409 100755 --- a/include/items.php +++ b/include/items.php @@ -3522,11 +3522,17 @@ function mail_store($arr) { dbesc($arr['mid']), intval($arr['channel_id']) ); + if($r) { logger('mail_store: duplicate item ignored. ' . print_r($arr,true)); return 0; } + if(! $r && $arr['mail_recalled'] = 1) { + logger('mail_store: recalled item not found. ' . print_r($arr,true)); + return 0; + } + call_hooks('post_mail',$arr); if(x($arr,'cancel')) { -- cgit v1.2.3