Issue #10730: Use crypto_api for generating nonces and improve hashing
[mantis/radio.git] / scripts / send_emails.php
blobff3e81bac7dba82e4a98f15534322e38316cae75
1 #!/usr/bin/php -q
2 <?php
3 # MantisBT - A PHP based bugtracking system
4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
5 # Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
6 # MantisBT is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 2 of the License, or
9 # (at your option) any later version.
11 # MantisBT is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
18 # See the README and LICENSE files for details
20 global $g_bypass_headers;
21 $g_bypass_headers = 1;
23 require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );
25 require_once( 'email_api.php' );
27 # Make sure this script doesn't run via the webserver
28 if( php_sapi_name() != 'cli' ) {
29 echo "send_emails.php is not allowed to run through the webserver.\n";
30 exit( 1 );
33 echo "Sending emails...\n";
34 email_send_all();
35 echo "Done.\n";
37 exit( 0 );