Zubrag.com
March 26, 2019, 10:58:50 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Send confirmation email on signup  (Read 14767 times)
ianprend
Newbie
*
Posts: 5


« on: December 08, 2009, 09:43:19 PM »

On successful signup I'd like to send out an automatic confirmation email to the customer with all the information they entered on the signup form as well as a little welcome message. I'd also like to have a notification email sent to me that I have a new subscriber. Does anybody know how this can be done?

Logged
1ststop
Newbie
*
Posts: 30


« Reply #1 on: March 14, 2010, 05:48:58 AM »

I've done this in two parts.

First part is to send yourself an email and that is easy. Find this in signup.php:

// save user to database
    $fusers = fopen(USERS_LIST_FILE,'a+');
    if (!$fusers) {
      $this->error = "Cannot add user to database.";
      return false;
    }
    fputs($fusers, "\n" . $this->login. ',' . $this->pass . ',' . $this->email);
    fclose($fusers);


and add this after it:

 // Send email to confirm signup
$to = "your email address";
$subject = "New Signup Confirmation";
$message = "You have a new signup";
$success = mail($to,$subject,$message);
 
before this:

}

  function redirect() {
    header('Location: ' . SIGNUP_THANKS_URL);
    exit();

This is a very simple mail to inform you that a new signup has occurred. This can be more advanced but would require a lot more coding.

The second is more tricky...
Logged
1ststop
Newbie
*
Posts: 30


« Reply #2 on: March 14, 2010, 09:09:36 AM »

This is a second reply to answer the second part to overcome the forum's 1000 character restriction.

To send the user a confirmation of their signup I redirected to a copy of reminder.php that had been modified for my needs. My modifications are too lengthy to describe here, but Reminder.php has all the required elements for what you want. Just make a copy of reminder.php and all assosciated files (reminder_header, footer, form and settings.php etc.) I renamed the copy of reminder to accountconfirm.php and set it as the signup thankyou page. So, what happens is that the user creates their user account and then goes to a page where they can either send themselves their user information (via the modified copy of reminder.php) or they can go direct to login (via a link to login.php)

Logged
GuillaumeS
Newbie
*
Posts: 2


« Reply #3 on: January 14, 2011, 02:41:45 PM »

I would like to have more information.

I did what you said and it is working. After the signup, the user can re-type his e-mail to receive the confirmation.

How can I make that automatic ?? I need help to send the Login variable automaticly to the new lost password box.

Thanks !

Guillaume


This is a second reply to answer the second part to overcome the forum's 1000 character restriction.

To send the user a confirmation of their signup I redirected to a copy of reminder.php that had been modified for my needs. My modifications are too lengthy to describe here, but Reminder.php has all the required elements for what you want. Just make a copy of reminder.php and all assosciated files (reminder_header, footer, form and settings.php etc.) I renamed the copy of reminder to accountconfirm.php and set it as the signup thankyou page. So, what happens is that the user creates their user account and then goes to a page where they can either send themselves their user information (via the modified copy of reminder.php) or they can go direct to login (via a link to login.php)


Logged
1ststop
Newbie
*
Posts: 30


« Reply #4 on: February 25, 2011, 06:12:36 AM »

On signup.php you need to add a new cookie with the user's email address.
Then you can read the cookie in the modified reminder.php and add the email address to a hidden field instead of entering it again.

Logged
GuillaumeS
Newbie
*
Posts: 2


« Reply #5 on: February 25, 2011, 12:11:43 PM »

Thanks,

You you please explain how to add a new cookie with the user's email address ?

I am not familiar with this and I am sure it will help many other persons !
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC