Author Topic: setting a user limit on a list  (Read 5128 times)

paulmgray

  • Posts: 4
    • View Profile
setting a user limit on a list
« on: August 28, 2008, 03:07:45 pm »
Hi Dean,
I want to offer a free gift to new users when they register which is limited to 300, after the first 300 users have registered I want subsequent users to be sent a different welcome e-mail. (or to be registered in a different list). Is this possible?
Thanks
Paul

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
setting a user limit on a list
« Reply #1 on: September 07, 2008, 08:37:45 am »
Hi Paul,

There is a custom file that can be run after signup located at xtra/signup-xtra.php.  However, this script runs -after- the user is added to the database, so it would not help us get the right welcome message to the user.

Would a simple 'notification email' once the first list reaches 300 users suffice?  Once you receive this message you could manually update your web page to subscribe users to another list.  Is it important to have exactly 300 users receive the gift or can it be a few more?

For that, lets say you have list 1 (free gift!) and list 2 (not so great gift:P).  Enter this in the include xtra/signup.php file where indicated at the bottom of the file:
Code: [Select]
if($list=='1'){
 // check subscriber count
 $result=mysql_query("select count(*) from lm_users where list = '1';") or die(mysql_error);;
 list($count)=mysql_fetch_row($result);
 $subject="ListMailPRO Notification";
 $msg="List 1 has reached 300 users.  Update web site signup form to subscribe users to List 2";
 if($count>=300) mail('you@example.com',$subject,$msg,"From: \"ListMailPRO\" <listmail@example.com>");
}

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting