@@ -5672,19 +5672,29 @@ public static function sendUserConfirmationMail(User $user)
56725672 $ siteName = api_get_setting ('platform.site_name ' );
56735673 $ mailSubject = sprintf (get_lang ('[%s] Confirm your e-mail ' ), $ siteName );
56745674 $ firstName = $ user ->getFirstname ();
5675- $ mailBody = sprintf (get_lang ('Dear %s, ' ), $ firstName )
5676- ."\n\n"
5677- .sprintf (get_lang ('To verify your e-mail and enable your account on %s, please click the link below. ' ), $ siteName )
5678- ."\n\n"
5679- .Display::url ($ url , $ url )
5680- ."\n\n"
5681- .get_lang ('If you did not register this account, you can ignore this e-mail. No action will be taken. ' );
5675+ $ greeting = sprintf (get_lang ('Dear %s, ' ), $ firstName );
5676+ $ intro = sprintf (
5677+ get_lang ('To verify your e-mail and enable your account on %s, please click the link below. ' ),
5678+ $ siteName
5679+ );
5680+ $ outro = get_lang ('If you did not register this account, you can ignore this e-mail. No action will be taken. ' );
5681+
5682+ $ tpl = Container::getTwig ();
5683+ $ mailBodyHtml = $ tpl ->render (
5684+ '@ChamiloCore/Mailer/Legacy/user_email_confirmation.html.twig ' ,
5685+ [
5686+ 'greeting ' => $ greeting ,
5687+ 'intro ' => $ intro ,
5688+ 'outro ' => $ outro ,
5689+ 'url ' => $ url ,
5690+ ]
5691+ );
56825692
56835693 api_mail_html (
56845694 self ::formatUserFullName ($ user ),
56855695 $ user ->getEmail (),
56865696 $ mailSubject ,
5687- $ mailBody
5697+ $ mailBodyHtml
56885698 );
56895699 Display::addFlash (Display::return_message (get_lang ('Check your e-mail and follow the instructions. ' )));
56905700 }
0 commit comments