Email Auto-response coming from "NOBODY"
Posted: Fri Dec 10, 2010 3:55 am
Hi
I just started using php in my site, i tried using a membership script i got online and it works perfectly fine, the only problem every time a new member register the email response as stated in the email comes from "NOBODY" instead of the name of my website. Just like when i register here in DevNet the email notification is coming > From:"devnet@devnetwork.net". I posted the registration script below and if somebody who can help me where to configure the email auto response into my domain name email i would really appreciate. Thanks
Denver
I just started using php in my site, i tried using a membership script i got online and it works perfectly fine, the only problem every time a new member register the email response as stated in the email comes from "NOBODY" instead of the name of my website. Just like when i register here in DevNet the email notification is coming > From:"devnet@devnetwork.net". I posted the registration script below and if somebody who can help me where to configure the email auto response into my domain name email i would really appreciate. Thanks
Denver
Code: Select all
<?php
include("../init.php");
require_once('../modules/recaptchalib.php');
include("header.php");
subheader($lang[104], '', '');
if(isset($_POST['join'])) {
$email = trim(htmlspecialchars($_POST['email']));
$password = trim(htmlspecialchars($_POST['pass']));
if(($email != "") && ($password != "")) {
$resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
if($resp->is_valid) {
if(isValidEmail($email)) {
$q = mysql_query("SELECT * FROM `members` WHERE(email = '{$email}')") or die(mysql_error());
$n = mysql_num_rows($q);
if(!$n) {
$r = rand(); $t = time(); $key = md5($r."-".$t); $verified = "0"; $join = date("d m Y");
$w = mysql_query("INSERT INTO `members` (`password` ,`email` ,`key` ,`verified` ,`join`)VALUES ('{$password}', '{$email}', '{$key}', '{$verified}', '{$join}')") or die(mysql_error());
if($w) {
newuser_email($email, $key);
$err = "<div class='infobox'>{$lang[76]} {$webtitle}<br/><br/><small>{$lang[77]}</small></div>"; am_showRegister(); }
} else { $err = "<div class='errorbox'>{$lang[78]}<br/><br/><small><a href='{$website}/user/resend.php'>{$lang[72]}</a></small></div>"; am_showRegister(); }
} else { $err = "<div class='errorbox'>{$lang[79]}</div>"; am_showRegister(); }
} else { $err = "<div class='errorbox'>{$lang[54]}</div>"; am_showRegister(); }
} else { $err = "<div class='errorbox'>{$lang[80]}</div>"; am_showRegister(); }
} else { am_showRegister(); }
function am_showRegister() { global $lang; global $website; global $publickey; global $webtitle; global $err; ?>
<center><form method='POST' action='<?php echo $website; ?>/user/register.php'>
<div class='logindiv'>
<div id='logindiv-header'><p><?php echo $lang[43]; ?> <?php echo $webtitle; ?></p></div>
<br/><?php echo $err; ?>
<table>
<tr><td class='first'><?php echo $lang[3]; ?>:</td>
<td><input type='text' name='email' id='email' size='25' /><br/><small><?php echo $lang[81]; ?>)</small></td></tr>
<tr><td class='first'><?php echo $lang[4]; ?>:</td>
<td><input type='password' name='pass' id='pass' size='25' /><br/><small><?php echo $lang[82]; ?></small></td></tr>
<tr><td class='first'><?php echo $lang[51]; ?>:</td><td>
<?php echo recaptcha_get_html($publickey); ?>
</td></tr><tr><td></td><td><input type='submit' name='join' class='button' value='<?php echo $lang[5]; ?>' /> *</td></tr>
<tr><td></td><td id='sign-in'><?php echo $lang[10]; ?> <?php echo $webtitle; ?>? <a href='<?php echo $website; ?>/user/login.php'><?php echo $lang[105]; ?></a></td></tr>
</table></div></form></center><br/><br/>
<?php } include("footer.php"); ?>