forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 ecards & email => Topic started by: MaxxFusion on February 04, 2006, 09:45:58 pm
-
I want to change the info that gets sent to the admin one a new registration. Right now the admin gets an email stating "username" has signed up. I would like to include the email address and possiy a couple of the Profile fields in this email. That way it will be easy to idnetify the user that is registering.
Thanks,
Frank
-
in db_input.php the email gets sent
cpg_mail('admin', sprintf($lang_db_input_php['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_db_input_php['notify_admin_email_body'], USER_NAME, $CONFIG['ecards_more_pic_target'].(substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .'editpics.php?mode=upload_approval' ));
before you'll have to add a sql query and read what you need from the users table. Add that to the var $lang_db_input_php['notify_admin_email_body']
the actual email subject and body can be found in the language files
-
Do you have an example of what that query would look like?
-
had a look at it again... it's in register.php
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
You won't need a query but can use the vars $_POST['user_profile1'] - $_POST['user_profile6']
looks somehow like
$mailbody = $lang_register_php_def['notify_admin_email_body']."\n".$_POST['user_profile1']."\n".$_POST['user_profile1']."\n";
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($mailbody, $user_name));