add email threading headers

git-svn-id: http://svn.cacert.cl/Software/Voting/vote@46 d4452222-2f33-11de-9270-010000000000
This commit is contained in:
community.cacert.org 2009-05-29 05:14:50 +00:00
parent ed0a6f42d5
commit 1d33c70c0e
5 changed files with 13 additions and 8 deletions

View file

@ -80,13 +80,18 @@ Kind regards,
the voting system. the voting system.
BODY; BODY;
$this->notify("Re: ".$decision['tag']." - ".$decision['title'],$body); $this->notify("Re: ".$decision['tag']." - ".$decision['title']." - finalised",$body,$decision['tag']);
} }
} }
} }
function notify($subject,$body) function notify($subject,$body,$tag,$first=FALSE)
{ {
mail($this->board,$subject,$body,"From: Voting System <returns@cacert.org>"); if ($first) {
$header = "Message-id: <".$tag.">\r\n";
} else {
$header = "References: <".$tag.">\r\nIn-reply-to: <".$tag.">\r\n";
}
mail($this->board,$subject,$body,$header."From: Voting System <returns@cacert.org>");
//mail("testsympa@lists.cacert.org",$subject,$body,"From: Voting System <returns@cacert.org>"); //mail("testsympa@lists.cacert.org",$subject,$body,"From: Voting System <returns@cacert.org>");
} }
function auth() function auth()

View file

@ -72,7 +72,7 @@ again.
Kind regards, Kind regards,
the voting system the voting system
BODY; BODY;
$db->notify("Re: $tag - $title",$body); $db->notify("Re: $tag - $title - modified",$body,$tag);
} else { } else {
?> ?>
<b>The motion has NOT been proposed!</b><br/> <b>The motion has NOT been proposed!</b><br/>
@ -127,7 +127,7 @@ Abstain: $voteurl&vote=0
Kind regards, Kind regards,
the voting system the voting system
BODY; BODY;
$db->notify("$tag - $title",$body); $db->notify("$tag - $title",$body,$tag,TRUE);
} else { } else {
?> ?>
<b>The motion has NOT been proposed!</b><br/> <b>The motion has NOT been proposed!</b><br/>

View file

@ -28,7 +28,7 @@ $content
Kind regards, Kind regards,
the voting system the voting system
BODY; BODY;
$db->notify("Re: $tag - $title - withdrawn",$body); $db->notify("Re: $tag - $title - withdrawn",$body,$tag);
} }
$stmt = $db->getStatement("close decision"); $stmt = $db->getStatement("close decision");
$status = -2; $status = -2;

View file

@ -80,7 +80,7 @@ Kind regards,
the vote system the vote system
BODY; BODY;
$db->notify("Re: $tag - $title",$body); $db->notify("Re: $tag - $title",$body,$tag);
} else { } else {
?> ?>
<b>The vote has NOT been registered.</b><br/> <b>The vote has NOT been registered.</b><br/>

View file

@ -64,7 +64,7 @@ Kind regards,
the vote system the vote system
BODY; BODY;
//$db->notify("Re: $tag - $title",$body); //$db->notify("Re: $tag - $title",$body,$tag);
} else { } else {
?> ?>
<b>Your vote has NOT been registered.</b><br/> <b>Your vote has NOT been registered.</b><br/>