Changeset 1018 for trunk/password.php


Ignore:
Timestamp:
Feb 1, 2006, 12:38:48 AM (19 years ago)
Author:
rub
Message:

[NBM] Step 1: Create new include files with current notification/mail fonctions (with improvement)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/password.php

    r1004 r1018  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    3232define('PHPWG_ROOT_PATH','./');
    3333include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
    34 
    35 // +-----------------------------------------------------------------------+
    36 // |                              functions                                |
    37 // +-----------------------------------------------------------------------+
    38 
    39 /**
    40  * sends an email, using PhpWebGallery specific informations
    41  */
    42 function pwg_mail($to, $from, $infos = '')
    43 {
    44   global $conf;
    45 
    46   $headers = 'From: <'.$from.'>'."\n";
    47   $headers.= 'Reply-To: '.$from."\n";
    48 
    49   $options = '-f '.$from;
    50  
    51   $subject = l10n('password updated');
    52  
    53   $content = $infos;
    54   $content.= "\n\n-- \nPhpWebGallery ".PHPWG_VERSION;
    55 
    56   if ($conf['mail_options'])
    57   {
    58     return mail($to, $subject, $content, $headers, $options);
    59   }
    60   else
    61   {
    62     return mail($to, $subject, $content, $headers);
    63   }
    64 }
     34include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    6535
    6636// +-----------------------------------------------------------------------+
     
    11989          ;
    12090
    121         if (pwg_mail($row['email'], $mail_webmaster, $infos))
     91        if (pwg_mail($row['email'], $mail_webmaster, l10n('password updated'), $infos))
    12292        {
    12393          $data =
Note: See TracChangeset for help on using the changeset viewer.