replaced shell_exec for php mail function

This commit is contained in:
Blade of Darkness 2019-11-12 17:48:17 +00:00
parent cd6f3a0160
commit e5392cefcb
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ $interest = $_GET['interest'];
$pubkey = $_GET['pubkey']; $pubkey = $_GET['pubkey'];
$tv = $_GET['tv']; $tv = $_GET['tv'];
$from = 'From: www-data <www-data@thunix.net>';
$destination_addr = "newuser@thunix.net"; $destination_addr = "newuser@thunix.net";
$subject = "New User Registration"; $subject = "New User Registration";
$mailbody = "A new user has tried to register. $mailbody = "A new user has tried to register.
@ -24,7 +25,7 @@ if ( $tv != "tildeverse" ) {
die(); die();
} }
shell_exec("echo '$mailbody' | /usr/bin/mail -s '$subject' $destination_addr "); mail($destination_addr, $subject, $mailbody, $from);
// In the future, here, we *should* be able to build a process that // In the future, here, we *should* be able to build a process that
// somehow auto-verifies the user, and instead of email, it'll kick off the new user process here // somehow auto-verifies the user, and instead of email, it'll kick off the new user process here