This topic is locked

send email adress

12/17/2010 6:50:39 PM
PHPRunner General questions
F
freeF16 author

goodnight everyone

I have a proposal that has not yet taken into account is that the email field after filling it is sent to the email address

Sergey Kornilov admin 12/19/2010

You need to rephrase your question, it's not understandable.

T
tedwilder 12/23/2010



You need to rephrase your question, it's not understandable.


I understand that he wants when registring a new user , that a mail could be sent to the user with login information thanks to the email field in user table.
Because it's true that phprunner can send an email to the admin to tell a new user has been created however it doesnt send a mail to the user itself to confirm its registration. sure we can choose the "activate link registration". but sometimes it's the admin himself who creates user login/password. In that case we have to send our user their login/password manually. a simple tick box " send registration login to user " could save us this task.

maybe I extrapolate a bit <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=55250&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> but this is the problem I'm facing here withan intranet application.

501371 12/23/2010
  1. to send two different emails (one to user and one to admin) edit your event in the following way:

    add page - after record added event

    ------------------------------

    if ($values["email"])

    {

    $arr = explode(",",$values["email"]);

    for ($i=0;$i<count($arr);$i++)

    {

    //first email to user

    $email=$arr[$i];

    $from=$values["senderemail"];

    $msg="Project: ".$values["ProjectName"]."\r".$values["Body"]."\r\r"."If you have any questions call us at ";

    $msg.="\r\r"."Link to Files: http://www.yoursite.com/digital_locker/projects_view.php?editid1=".$keys["ID"'>http://www.yoursite.com/digital_locker/projects_view.php?editid1=".$keys["ID";];

    $msg.="\r"."Project Notes:" .$values["NOTES"];

    $subject=$values["subject"];

    if ($email)

    {

    $ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));

    if(!$ret["mailed"])

    echo $ret["message"];

    }

    //second email to admin

    $email="plot@yoursite.com";

    $from=$values["senderemail"];

    $msg2="Project: ".$values["ProjectName"]."\r".$values["Body"]."\r\r"."If you have any questions call us at ";

    $msg2.="\r\r"."Link to Files: http://www.yoursite.com/digital_locker/projects_view.php?editid1=".$keys["ID"'>http://www.yoursite.com/digital_locker/projects_view.php?editid1=".$keys["ID";];

    $msg2.="\r"."Project Notes:" .$values["NOTES"];

    $subject=$values["subject"];

    if ($email)

    {

    $ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg2, 'from'=>$from));

    if(!$ret["mailed"])

    echo $ret["message"];

    }

    }

    }

    ------------------------------

    Edit $msg2 as you want.