I have tried but it's a little complicated for me so i have paste the code here :
From functions.php :
`
function zp_mail($subject, $message, $headers = '', $admin_emails=null) {
`
echo "message=$message";
`
if (is_null($admin_emails)) { $admin_emails = getAdminEmail(); }
if (count($admin_emails) > 0) {
// Make sure no one is trying to use our forms to send Spam
// Stolen from Hosting Place:
// http://support.hostingplace.co.uk/knowledgebase.php?action=displayarticle&cat=0000000039&id=0000000040
$badStrings = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:");
foreach($_POST as $k => $v) {
foreach($badStrings as $v2) {
if (strpos($v, $v2) !== false) {
header("HTTP/1.0 403 Forbidden");
die("Forbidden");
exit();
}
}
}
foreach($_GET as $k => $v){
foreach($badStrings as $v2){
if (strpos($v, $v2) !== false){
header("HTTP/1.0 403 Forbidden");
die("Forbidden");
exit();
}
}
}
if( $headers == '' ) {
$headers = "From: " . get_language_string(getOption('gallery_title'), getOption('locale')) . "<zenphoto@" . $_SERVER['SERVER_NAME'] . ">";
}
// Convert to UTF-8
if (getOption('charset') != 'UTF-8') {
$subject = utf8::convert($subject, getOption('charset'));
$message = utf8::convert($message, getOption('charset'));
`
echo "UTF8 converted message=$message";
`
}
// Send the mail
foreach ($admin_emails as $email) {
UTF8:

end_mail($email, $subject, $message, $headers);
}
}
}
`
From auth_zp.php, zp-mail is only call here :
`
if (isset($_POST['login']) && isset($_POST['user']) && isset($_POST['pass'])) {
$post_user = sanitize($_POST['user'],3);
$post_pass = sanitize($_POST['pass'],3);
$redirect = sanitize($_POST['redirect'],3);
if ($_zp_loggedin = checkLogon($post_user, $post_pass)) {
zp_setcookie("zenphoto_auth", md5($post_user . $post_pass), time()+5184000, $cookiepath);
if (!empty($redirect)) { header("Location: " . FULLWEBPATH . $redirect); }
} else {
// Clear the cookie, just in case
zp_setcookie("zenphoto_auth", "", time()-368000, $cookiepath);
// was it a request for a reset?
$admins = getAdministrators();
$admin = array_shift($admins);
$key = $admin['pass'];
$code_cypher = md5(bin2hex(rc4($key, trim($post_pass))));
if (isset($_POST['code_h'])) {
$code_hash = sanitize($_POST['code_h'],3);
} else {
$code_hash = '';
}
if (($code_cypher == $code_hash) && strlen(trim($post_pass)) == CAPTCHA_LENGTH) {
if (empty($post_user)) {
$requestor = 'You are receiving this e-mail because of a password reset request on your Zenphoto gallery.';
} else {
$requestor = sprintf(gettext("You are receiving this e-mail because of a password reset request on your Zenphoto gallery from a user who tried to log in as %s."),$post_user);
}
$admins = getAdministrators();
$user = array_shift($admins);
$adm = $user['user'];
$pas = $user['pass'];
setOption('admin_reset_date', time());
$req = getOption('admin_reset_date');
$ref = md5($req . $adm . $pas);
$msg = "\n".$requestor.
"\n".sprintf(gettext("To reset your Zenphoto Admin passwords visit: %s"),FULLWEBPATH."/".ZENFOLDER."/admin-options.php?ticket=$ref") .
"\n".gettext("If you do not wish to reset your passwords just ignore this message. This ticket will automatically expire in 3 days.");
`
echo "message to be passed=$msg";
`
zp_mail(gettext("The Zenphoto information you requested"), $msg);
$_zp_login_error = 2;
} else {
$_zp_login_error = 1;
}
}
}
}
`
Can you help me with this please?
Thank you very much for your help!