mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add threading headers to request notification mails
This allows for grouping mails that belong to the same request. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
c82fc025e2
commit
0e84667c33
1 changed files with 4 additions and 0 deletions
|
@ -1038,6 +1038,7 @@ function pkgbase_file_request($ids, $type, $merge_into, $comments) {
|
||||||
$q.= $dbh->quote($merge_into) . ", " . $uid . ", ";
|
$q.= $dbh->quote($merge_into) . ", " . $uid . ", ";
|
||||||
$q.= $dbh->quote($comments) . ", UNIX_TIMESTAMP())";
|
$q.= $dbh->quote($comments) . ", UNIX_TIMESTAMP())";
|
||||||
$dbh->exec($q);
|
$dbh->exec($q);
|
||||||
|
$request_id = $dbh->lastInsertId();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Send e-mail notifications.
|
* Send e-mail notifications.
|
||||||
|
@ -1077,8 +1078,11 @@ function pkgbase_file_request($ids, $type, $merge_into, $comments) {
|
||||||
if (!empty($bcc)) {
|
if (!empty($bcc)) {
|
||||||
$headers .= "Bcc: $bcc\r\n";
|
$headers .= "Bcc: $bcc\r\n";
|
||||||
}
|
}
|
||||||
|
$thread_id = "<pkg-request-" . $request_id . "@aur.archlinux.org>";
|
||||||
$headers .= "Reply-to: noreply@aur.archlinux.org\r\n" .
|
$headers .= "Reply-to: noreply@aur.archlinux.org\r\n" .
|
||||||
"From: notify@aur.archlinux.org\r\n" .
|
"From: notify@aur.archlinux.org\r\n" .
|
||||||
|
"In-Reply-To: $thread_id\r\n" .
|
||||||
|
"References: $thread_id\r\n" .
|
||||||
"X-Mailer: AUR";
|
"X-Mailer: AUR";
|
||||||
@mail($AUR_REQUEST_ML, "AUR " . ucfirst($type) . " Request for " .
|
@mail($AUR_REQUEST_ML, "AUR " . ucfirst($type) . " Request for " .
|
||||||
$row['Name'], $body, $headers);
|
$row['Name'], $body, $headers);
|
||||||
|
|
Loading…
Add table
Reference in a new issue