- $email_tpl = load_view_file("view/register_open_eml.tpl");
- $email_tpl = replace_macros($email_tpl, array(
- '$sitename' => $a->config['sitename'],
- '$siteurl' => $a->get_baseurl(),
- '$username' => $user[0]['username'],
- '$email' => $user[0]['email'],
- '$password' => $register[0]['password'],
- '$uid' => $user[0]['uid']
- ));
-
- $res = mail($user[0]['email'], sprintf(t('Registration details for %s'), $a->config['sitename']),
- $email_tpl,
- 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n"
- . 'Content-type: text/plain; charset=UTF-8' . "\n"
- . 'Content-transfer-encoding: 8bit' );
-
- if($res) {
- notice( t('Account approved.') . EOL );
- return;
- }