Location: PHPKode > projects > MySQLauction > libphp/emailnewuser.php
<?PHP
  ######################################################################
  # 
  # In accordance with the GPL, this copyright notice MUST remain
  # intact:
  #
  # MySQLauction Release Version 0.1.0 (021001)
  # Copyright (C) 2002 High Sierra Networks, Inc.
  # http://www.servers-r-us.com
  # hide@address.com
  #
  ######################################################################
  #
  # This program is free software; you can redistribute it and/or
  # modify it under the terms of the GNU General Public License
  # as published by the Free Software Foundation; either version 2
  # of the License, or (at your option) any later version.
  # 
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  # 
  # You should have received a copy of the GNU General Public License
  # along with this program; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  # MA 02111-1307, USA.
  #
  ######################################################################

  ######################################################################
  #
  # Written by Jorge Gonzalez - Athena Soft, S.A. de C.V.
  # http://www.athenasoft.com.mx
  # hide@address.com
  #
  # Name: emailnewuser.php
  # Date: 021001
  # Purpose:
  # This script emails a welcome message to a new registerd user and
  # provides with a key code to activate her account.
  # Restrictions:
  # None.
  # Change history:
  # 021001 First version.
  ######################################################################

  function emailnewuser($email,$id,$name,$password) {
    include("auction.conf.php");

    $CODE = "0123456789abcdefghijklmnopqrstuvwxyz9876543210";
    srand(time());
    $key = strlen($id);
    for($i = 0; $i < 5; $i++) {$key = $key.$CODE[rand(0,45)];}
    $key = $key.$id;
    for($i = 0; $i < 5; $i++) {$key = $key.$CODE[rand(0,45)];}

    include("$LIBDIR/auction.conf.lang.php");
    $subject = $L_WLKMSUBJECT;
    $headers = "Content-type: text/plain; charset=iso-8859-1\r\n".
               "From: $WEBMASTER\r\n".
               "Reply-to: $SUPPORTBOX\r\n".
               "X-Mailer: PHP-powered\r\n";
    $msg = "$name:\n\n";
    $msg .= $L_WLKMTEXT;

    mail($email,$subject,$msg,$headers);
  }
?>
Return current item: MySQLauction