Couple of fixes, adding php-json

This commit is contained in:
2021-01-13 00:19:11 +01:00
parent 1265f2b339
commit ed67c68a1a
4 changed files with 6 additions and 6 deletions

View File

@ -6,3 +6,5 @@ $recipients = [
%%RECIPIENTS_PR%%
]
];
$from = '%%SMTP_FROM%%';

View File

@ -1,5 +1,5 @@
<?php
require_once('config.php');
include('config.php');
// check for POST request
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
@ -50,11 +50,9 @@ $message = $decoded['sender']['login']
. ".\n" .
$decoded['pull_request']['html_url'];
log("SUBJECT: " . $subject . "; " . $message);
foreach($recipients['pr'] as $recp) {
mail($recp, $subject, $message);
mail($recp, $subject, $message, $from);
}
// success, do something