--- dokuwiki-20110329/inc/common.php~ 2011-03-29 09:15:04.000000000 +0300 +++ dokuwiki-20110329/inc/common.php 2011-03-29 09:16:58.468168676 +0300 @@ -1190,7 +1190,21 @@ }else{ $subject = '['.$conf['mailprefix'].'] '.$subject; } - mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc); + + $headers = array(); + // add mail headers to identify page changes in same mail thread + $file = wikiFN($id); + $cur = @filemtime($file); + $headers['Message-Id'] = "$id?rev=$cur"; + if ($rev) { + $headers['In-Reply-To'] = "$id?rev=$rev"; + } + $h = ''; + foreach ($headers as $k => $v) { + $h .= sprintf("%s: %s%s", $k, $v, MAILHEADER_EOL); + } + + mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc,$h); } /**