mail sync/migrate continued; also abstract delivery loop to make it re-usable, change refresh_all to use delivery loop.

This commit is contained in:
redmatrix
2015-10-15 18:52:04 -07:00
parent 7517c76ae4
commit 93f061f78a
9 changed files with 115 additions and 95 deletions

View File

@@ -849,15 +849,6 @@ function import_mail($channel,$mails) {
if(! $m)
continue;
if($mail['conv_guid']) {
$x = q("select id from conv where guid = '%s' and uid = %d limit 1",
dbesc($mail['conv_guid']),
intval($channel['channel_id'])
);
if($x) {
$m['convid'] = $x[0]['id'];
}
}
$m['aid'] = $channel['channel_account_id'];
$m['uid'] = $channel['channel_id'];
mail_store($m);