не отсылаются письма на имэйл!
После установки не отсылаются письма на имэйл при ригестрации нового пользователя!
сайт стоит на хосте, smtp включен!! Помогите!!! :yell: :yell: |
у меня стоие Nuke 8
вот код функции mail в Your Accaunt function mail_password($username, $code) { global $sitename, $adminmail, $nukeurl, $user_prefix, $db, $module_name; $username = filter($username, "nohtml", 1); $username = substr($username, 0, 25); $username = htmlspecialchars($username); $sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'"; $result = $db->sql_query($sql); if($db->sql_numrows($result) == 0) { include("header.php"); OpenTable(); echo "<center>"._SORRYNOUSERINFO."</center>"; CloseTable(); include("footer.php"); } else { $host_name = $_SERVER['REMOTE_ADDR']; $row = $db->sql_fetchrow($result); $user_email = filter($row['user_email'], "nohtml"); $user_password = $row['user_password']; $user_password = htmlspecialchars(stripslashes($user_password)); $areyou = substr($user_password, 0, 10); if ($areyou==$code) { $newpass=makepass(); $message = ""._USERACCOUNT." '$username' "._AT." $sitename "._HASTHISEMAIL." "._AWEBUSERFROM." $host_name "._HASREQUESTED."\n\n"._YOURNEWPASSWORD." $newpass\n\n "._YOUCANCHANGE." $nukeurl/modules.php?name=$module_name\n\n"._IFYOUDIDNOTASK.""; $subject = ""._USERPASSWORD4." $username"; $mailheaders = "Content-Type: text/plain; charset="._CHARSET."\n"; $mailheaders .= "From: $sitename <$adminmail>\n"; mail($user_email, $subject, $message, $mailheaders); /* Next step: add the new password to the database */ $cryptpass = md5($newpass); $query = "UPDATE ".$user_prefix."_users SET user_password='$cryptpass' WHERE username='$username'"; if (!$db->sql_query($query)) { echo ""._UPDATEFAILED.""; } include ("header.php"); OpenTable(); echo "<center>"._PASSWORD4." $username "._MAILED."<br><br>"._GOBACK."</center>"; CloseTable(); include ("footer.php"); /* If no Code, send it */ } else { $sql = "SELECT user_email, user_password FROM ".$user_prefix."_users WHERE username='$username'"; $result = $db->sql_query($sql); if($db->sql_numrows($result) == 0) { include ("header.php"); OpenTable(); echo "<center>"._SORRYNOUSERINFO."</center>"; CloseTable(); include ("footer.php"); } else { $host_name = $_SERVER['REMOTE_ADDR']; $row = $db->sql_fetchrow($result); $user_email = filter($row['user_email'], "nohtml"); $user_password = $row['user_password']; $areyou = substr($user_password, 0, 10); $message = ""._USERACCOUNT." '$username' "._AT." $sitename "._HASTHISEMAIL." "._AWEBUSERFROM." $host_name "._CODEREQUESTED."\n\n"._YOURCODEIS." $areyou \n\n"._WITHTHISCODE." $nukeurl/modules.php?name=$module_name&op=pass_lost\n"._IFYOUDIDNOTASK2.""; $subject=""._CODEFOR." $username"; $mailheaders = "Content-Type: text/plain; charset="._CHARSET."\n"; $mailheaders .= "From: $sitename <$adminmail>\n"; mail($user_email, $subject, $message, $mailheaders); include ("header.php"); OpenTable(); echo "<center>"._CODEFOR." $username "._MAILED."<br><br>"._GOBACK."</center>"; CloseTable(); include ("footer.php"); } } } } |
Часовой пояс GMT +4, время: 02:44. |
Copyright © 2005 by Soniks