"; $emailfromaddr = $administratorEmail; $emailfromname = api_get_setting('siteName'); $emailsubject = get_lang('YourReg').' '.api_get_setting('siteName'); $emailheaders = "From: ".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS)." <".$administratorEmail.">\n"; $emailheaders .= "Reply-To: ".$administratorEmail."\n"; $emailheaders .= "Return-Path: ".$administratorEmail."\n"; $emailheaders .= "charset: ".api_get_system_encoding()."\n"; $emailheaders .= "X-Mailer: PHP/" . phpversion() . "\n"; $emailheaders .= "X-Sender-IP: $REMOTE_ADDR"; // (small security precaution...) $recipient_name = api_get_person_name($firstname_form, $lastname_form, null, PERSON_NAME_EMAIL_ADDRESS); $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); $email_admin = api_get_setting('emailAdministrator'); $portal_url = $_configuration['root_web']; if ($_configuration['multiple_access_urls']) { $access_url_id = api_get_current_access_url_id(); if ($access_url_id != -1 ){ $url = api_get_access_url($access_url_id); $portal_url = $url['url']; } } if ($courseRegSucceed) { $emailbody = get_lang('Dear')." ".stripslashes(api_get_person_name($firstname_form, $lastname_form)).",\n".get_lang('OneResp')." $currentCourseName ".get_lang('RegYou')." ".api_get_setting('siteName')." ".get_lang('WithTheFollowingSettings')."\n\n".get_lang('Username')." : $username_form\n".get_lang('Pass').": $password_form\n".get_lang('Address')." ".api_get_setting('siteName')." ".get_lang('Is').": ".$portal_url."\n".get_lang('Problem')."\n".get_lang('SignatureFormula').",\n".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Manager')." ".api_get_setting('siteName')." \nT. ".api_get_setting('administratorTelephone')."\n".get_lang('Email').": ".api_get_setting('emailAdministrator')."\n"; $message = get_lang('TheU')." ".stripslashes(api_get_person_name($firstname_form, $lastname_form))." ".get_lang('AddedToCourse')."".get_lang('BackUser')."\n"; } else { $emailbody = get_lang('Dear')." ".api_get_person_name($firstname_form, $lastname_form).",\n ".get_lang('YouAreReg')." ".api_get_setting('siteName')." ".get_lang('WithTheFollowingSettings')."\n\n".get_lang('Username')." : $username_form\n".get_lang('Pass').": $password_form\n".get_lang('Address')." ".api_get_setting('siteName')." ".get_lang('Is').": ".$portal_url."\n".get_lang('Problem')."\n".get_lang('SignatureFormula').",\n".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Manager')." ".api_get_setting('siteName')." \nT. ".api_get_setting('administratorTelephone')."\n".get_lang('Email').": ".api_get_setting('emailAdministrator')."\n"; $message = stripslashes(api_get_person_name($firstname_form, $lastname_form))." ".get_lang('AddedU'); } $plugin = new AppPlugin(); $additionalParameters = array( 'smsType' => constant($plugin->getSMSPluginName().'::BEEN_SUBSCRIBED_COURSE'), 'userId' => $user_id, 'courseTitle' => $currentCourseName ); api_mail_html( $recipient_name, $email_form, $emailsubject, $emailbody, $sender_name, $email_admin, null, null, null, $additionalParameters ); /* * remove
".get_lang('IfYouWantToAddManyUsers').""; Display::display_footer();