[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/scripts/ -> send_emails.php (source)

   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 - 2011  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.
  10  #
  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.
  15  #
  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
  19  
  20  global $g_bypass_headers;
  21  $g_bypass_headers = 1;
  22  
  23  require_once( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'core.php' );
  24  
  25  require_once( 'email_api.php' );
  26  
  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 );
  31  }
  32  
  33  echo "Sending emails...\n";
  34  email_send_all();
  35  echo "Done.\n";
  36  
  37  exit( 0 );


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7