This topic is locked

Membership Template (field "From") is missing

11/1/2010 10:58:36 AM
PHPRunner General questions
I
itmann author

Hello Runners,
i have set up the Membership Template and i found out that the field "From" is missing. i could not found it neither in Options Page nor in the AfterSuccessfulRegistration Event. so when the registered user get an Email notification the server info appears instead of administrator Email-address. i wonder if i can include this somewhere.
the AfterSuccessfulRegistration Event i am using is the default one:
global $conn, $xt;

global $dal;

$pp="";

$xt->assign("payment","");

if($userdata["Username"]!="" && $userdata["Password"]!="")

{

//$tmpSQL="select from memusers where Username='" . $userdata["Username"] . "' and Password='" . $userdata["Password"] . "'";

//$rs = db_query($tmpSQL,$conn);

//$data = db_fetch_array($rs);

$dal_table=$dal->Table("memusers");

$rs = $dal_table->Query("Username='" . $userdata["Username"] . "' and Password='" . $userdata["Password"] . "'","");

$data = db_fetch_array($rs);

$_SESSION["ppuid"]=$data["ID"];

$uemail=$data["Email"];

$uname=$data["Username"];

//$tmpSQL="select
from memoptions";

//$rs = db_query($tmpSQL,$conn);

//$data = db_fetch_array($rs);

$dal_table=$dal->Table("memoptions");

$rs = $dal_table->QueryAll();

$data = db_fetch_array($rs);

$http_full="http://".$_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI";];

$http_full=str_replace("register.php","",$http_full);

$emailtext=$data["Reg_text"];

$emailtext=str_replace("##username##",$uname,$emailtext);

$emailtext=str_replace("##payment_link##",$http_full . "login.php?a=pp0&uid=" . $_SESSION["ppuid"],$emailtext);

$message=$emailtext;

$subject=$data["Reg_subj"];

$conf=$data["Regconfirm"];
if($conf!=0)

mail($uemail, $subject, $message);

}
thank you

Sergey Kornilov admin 11/1/2010

You can enter FROM email address in PHPRunner under Security->User Login settings.