Commit afd63565 authored by David Morley's avatar David Morley Committed by GitHub

Merge pull request #60 from diasporg/fix_admin_email

use adminemail from config.php file properly
parents eb476656 6c63a4e1
......@@ -46,7 +46,7 @@ while ($row = pg_fetch_array($result)) {
$to = $_email;
$subject = 'Edit notice from poduptime ';
$message = 'Data for ' . $_domain . " Updated. If it was not you reply and let me know! \n\n";
$headers = "From: support@diasp.org\r\nCc:support@diasp.org," . $_oldemail . "\r\n";
$headers = "From: " . $adminemail . "\r\nCc:" . $adminemail . "," . $_oldemail . "\r\n";
@mail($to, $subject, $message, $headers);
pg_free_result($result);
pg_close($dbh);
......
......@@ -32,7 +32,7 @@ while ($row = pg_fetch_array($result)) {
$to = $_email;
$subject = 'Temporary edit key for podupti.me';
$message = 'Link: https://podupti.me/db/edit.php?domain=' . $_domain . '&token=' . $uuid . ' Expires: ' . $expire . ' ' . $systemTimeZone . "\n\n";
$headers = "From: support@diasp.org\r\nBcc: support@diasp.org\r\n";
$headers = "From: " . $adminemail . "\r\nBcc: " . $adminemail . "\r\n";
@mail($to, $subject, $message, $headers);
echo 'Link sent to your email';
} else {
......@@ -42,10 +42,10 @@ while ($row = pg_fetch_array($result)) {
$result = pg_query_params($dbh, $sql, [$uuid, $expire, $_domain]);
$result || die('Error in SQL query: ' . pg_last_error());
$to = 'support@diasp.org';
$to = $adminemail;
$subject = 'FORWARD REQUEST: Temporary edit key for podupti.me';
$message = 'User trying to edit pod without email address. Email found: ' . $row['email'] . ' Link: https://podupti.me/db/edit.php?domain=' . $_domain . '&token=' . $uuid . ' Expires: ' . $expire . ' ' . $systemTimeZone . "\n\n";
$headers = "From: support@diasp.org\r\nBcc: support@diasp.org\r\n";
$headers = "From: " . $adminemail . "\r\nBcc: " . $adminemail . "\r\n";
@mail($to, $subject, $message, $headers);
echo 'Link sent to administrator to review and verify, if approved they will forward the edit key to you.';
}
......
......@@ -30,7 +30,7 @@ while ($row = pg_fetch_array($result)) {
$to = $row['email'];
$subject = 'Pod deleted from poduptime ';
$message = 'Pod ' . $_domain . ' was deleted from podupti.me as it was dead on the list. ' . $_comments . " Feel free to add back at any time. \n\n";
$headers = "From: support@diasp.org\r\nCc:support@diasp.org," . $row['email'] . "\r\n";
$headers = "From: " . $adminemail ."\r\nCc:" . $adminemail . "," . $row['email'] . "\r\n";
@mail($to, $subject, $message, $headers);
}
pg_free_result($result);
......@@ -39,7 +39,7 @@ while ($row = pg_fetch_array($result)) {
$to = $row['email'];
$subject = 'Pod removal warning from poduptime ';
$message = 'Pod ' . $_domain . ' is on the list to be deleted now because: ' . $_comments . ". \n\n Please let me know if you need help fixing before it is removed. \n\n";
$headers = "From: support@diasp.org\r\nCc:support@diasp.org," . $row['email'] . "\r\n";
$headers = "From: " . $adminemail ."\r\nCc:" . $adminemail . "," . $row['email'] . "\r\n";
@mail($to, $subject, $message, $headers);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment