Mail: real threading now works with outgoing mails.
This commit is contained in:
parent
a86baa372a
commit
0a29927e6d
|
@ -481,7 +481,13 @@ function delivery_run(&$argv, &$argc){
|
||||||
//logger("Mail: Data: ".print_r($it, true), LOGGER_DATA);
|
//logger("Mail: Data: ".print_r($it, true), LOGGER_DATA);
|
||||||
|
|
||||||
if($it['uri'] !== $it['parent-uri']) {
|
if($it['uri'] !== $it['parent-uri']) {
|
||||||
$headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n";
|
$headers .= "References: <".iri2msgid($it["parent-uri"]).">";
|
||||||
|
|
||||||
|
// If Threading is enabled, write down the correct parent
|
||||||
|
if (($it["thr-parent"] != "") and ($it["thr-parent"] != $it["parent-uri"]))
|
||||||
|
$headers .= " <".iri2msgid($it["thr-parent"]).">";
|
||||||
|
$headers .= "\n";
|
||||||
|
|
||||||
if(!$it['title']) {
|
if(!$it['title']) {
|
||||||
$r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||||
dbesc($it['parent-uri']),
|
dbesc($it['parent-uri']),
|
||||||
|
|
|
@ -790,7 +790,13 @@ function notifier_run(&$argv, &$argc){
|
||||||
$headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n";
|
$headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n";
|
||||||
|
|
||||||
if($it['uri'] !== $it['parent-uri']) {
|
if($it['uri'] !== $it['parent-uri']) {
|
||||||
$headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n";
|
$headers .= "References: <".iri2msgid($it["parent-uri"]).">";
|
||||||
|
|
||||||
|
// If Threading is enabled, write down the correct parent
|
||||||
|
if (($it["thr-parent"] != "") and ($it["thr-parent"] != $it["parent-uri"]))
|
||||||
|
$headers .= " <".iri2msgid($it["thr-parent"]).">";
|
||||||
|
$headers .= "\n";
|
||||||
|
|
||||||
if(!$it['title']) {
|
if(!$it['title']) {
|
||||||
$r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
$r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||||
dbesc($it['parent-uri']),
|
dbesc($it['parent-uri']),
|
||||||
|
|
|
@ -335,7 +335,7 @@ function onepoll_run(&$argv, &$argc){
|
||||||
intval($r[0]['id'])
|
intval($r[0]['id'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*switch ($mailconf[0]['action']) {
|
switch ($mailconf[0]['action']) {
|
||||||
case 0:
|
case 0:
|
||||||
logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'].". Doing nothing.", LOGGER_DEBUG);
|
logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'].". Doing nothing.", LOGGER_DEBUG);
|
||||||
break;
|
break;
|
||||||
|
@ -353,7 +353,7 @@ function onepoll_run(&$argv, &$argc){
|
||||||
if ($mailconf[0]['movetofolder'] != "")
|
if ($mailconf[0]['movetofolder'] != "")
|
||||||
imap_mail_move($mbox, $msg_uid, $mailconf[0]['movetofolder'], FT_UID);
|
imap_mail_move($mbox, $msg_uid, $mailconf[0]['movetofolder'], FT_UID);
|
||||||
break;
|
break;
|
||||||
}*/
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue