Give user email address after registration

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
PartieHonteuse™
Registered User
Posts: 27
Joined: Wed Mar 17, 2004 3:02 pm

Give user email address after registration

Post by PartieHonteuse™ »

Hi all, just wanted to know if this has been done yet or not but...I've found some code from http://www.omidsoft.com/tutorial/create_mailbox_cpanel

The code is as such..

Code: Select all

Create Custom Mailboxes using cPanel 
If you are using cPanel and you want to add an automated email signup form to your web site that's so easy. 

First create an html form and get the following information from user : 

- New Email Address. 

- Password. 

- ... (other information are not required.) 

Now set the action of this form to "signup.php" with the POST method and set the value to your email address. 

Example : 

<FORM name=a method=POST action="signup.php" autocomplete=off> 

<input type="hidden" name="to" value="your email address"> 

Now use the following code as "signup.php" : 

---------- 

<?php 
$ok = TRUE; 
$file = fopen ("http://username:password@Server's IP:2082/frontend/Xskin/mail/doaddpop.html?email=$NewEmail&domain=$domain&password=$Password&quota=50", "r"); 
if (!$file) { 
$ok = FALSE; 
$target = "error.htm"; 
} 
while (!feof ($file)) { 
$line = fgets ($file, 1024); 
if (ereg ("already exists!", $line, $out)) { 
$ok = FALSE; 
$target = "error.htm"; 
} 
} 
fclose($file); 
if ($ok) { 
$target = "done.htm"; 
$form_fields=array_keys($HTTP_POST_VARS); 
$temp="\n"; 
while($field=array_pop($form_fields)){ 
$temp.=" $field : = $HTTP_POST_VARS[$field] \n"; 
} 
mail($HTTP_POST_VARS['to'],"Free Email",$temp); 
} 
header("location:$target"); 
?> 
I would like to make this a part of the registration process. Example, person registers the name "testuser" at my site they get a 2mb email addy "testuser@mydomain.com". Also, not to be difficult but I've downloaded the Prune Users hack from this site v1.4.3em and was also wanting this email script to work with it also. Example, person registers name "testuser" at my site they get a 2mb email addy "testuser@mydomain.com" but then if they are inactive after a set period of time the Prune User hack prunes the user from the DB and also deletes the email addy using the script section above or something else.

I am using CPanel X Build 9.3.0-RELEASE 5. Hopefully, this has already been done and my searches were just not using the correct phrases or hopefully someone is willing to help out!

Thanks in advance,
Partie™


P.S. I'm not expecting that high of a memberlist (maybe 50, darn happy to hit 100 users, TOPS.)
User avatar
OmegaQuest
Registered User
Posts: 76
Joined: Mon Sep 01, 2003 9:12 pm
Location: Washington, DC

Post by OmegaQuest »

It dosent seem like it would be that hard to do this, for the sign up...

And the Auto Delete the account if the user is not active would not be that hard as well if you could obtain the code to Delete a users E-mail via cPanel like you did with the Signup...
PartieHonteuse™
Registered User
Posts: 27
Joined: Wed Mar 17, 2004 3:02 pm

Post by PartieHonteuse™ »

Wow, and it only took 6 months to get a reply lol. I guess it's better late than never. Well, I already created the MOD that let's users sign up for email addresses. Still have yet to figure out on how to delete the user but I don't think I want to wait another six months for a reply so go ahead and consider this topic closed.

Thanks again omega,
Partie™
Post Reply

Return to “[2.0.x] MOD Requests”