From 81bdfbf7b410192591e72619c8f1aaed28c7bfee Mon Sep 17 00:00:00 2001 From: rub Date: Tue, 31 Jan 2006 23:38:48 +0000 Subject: [NBM] Step 1: Create new include files with current notification/mail fonctions (with improvement) git-svn-id: http://piwigo.org/svn/trunk@1018 68402e56-0260-453c-a942-63ccdbb3a9ee --- password.php | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'password.php') diff --git a/password.php b/password.php index 9e0ad4029..87a568f3c 100644 --- a/password.php +++ b/password.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) // | file : $RCSfile$ @@ -31,37 +31,7 @@ define('PHPWG_ROOT_PATH','./'); include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); - -// +-----------------------------------------------------------------------+ -// | functions | -// +-----------------------------------------------------------------------+ - -/** - * sends an email, using PhpWebGallery specific informations - */ -function pwg_mail($to, $from, $infos = '') -{ - global $conf; - - $headers = 'From: <'.$from.'>'."\n"; - $headers.= 'Reply-To: '.$from."\n"; - - $options = '-f '.$from; - - $subject = l10n('password updated'); - - $content = $infos; - $content.= "\n\n-- \nPhpWebGallery ".PHPWG_VERSION; - - if ($conf['mail_options']) - { - return mail($to, $subject, $content, $headers, $options); - } - else - { - return mail($to, $subject, $content, $headers); - } -} +include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); // +-----------------------------------------------------------------------+ // | send a new password | @@ -118,7 +88,7 @@ SELECT '.$conf['user_fields']['id'].' AS id ."\n".l10n('Password').': '.$new_password ; - if (pwg_mail($row['email'], $mail_webmaster, $infos)) + if (pwg_mail($row['email'], $mail_webmaster, l10n('password updated'), $infos)) { $data = array( -- cgit v1.2.3