From f35d6e8240ade94959dc0afc4bde3768ee15bb2c Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sat, 13 Sep 2025 12:11:53 +0200 Subject: [PATCH] OTP mail in HTML --- include/class/noalyss_user.class.php | 32 +++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/include/class/noalyss_user.class.php b/include/class/noalyss_user.class.php index b50555d19..2e937415c 100644 --- a/include/class/noalyss_user.class.php +++ b/include/class/noalyss_user.class.php @@ -2019,6 +2019,7 @@ class Noalyss_User { if ( $this->authent_method !=1 ) { return false; } $mail=new \Sendmail(); + $mail->set_format("HTML"); $mail->set_from(ADMIN_WEB); $mail->mailto($this->getEmail()); $mail->set_subject(_("NOALYSS : votre code secret ")); @@ -2030,9 +2031,12 @@ class Noalyss_User } $otp=new \Noalyss\OTP(); $code=$otp->compute_code($this->otp_secret); - $message="Bonjour, - -Voici votre code secret pour NOALYSS : $code + $message="

Bonjour, +
+
+

Voici votre code secret pour NOALYSS : $code +

+ "; @@ -2069,6 +2073,7 @@ Voici votre code secret pour NOALYSS : $code */ function send_link_otp($base_url=null) { $mail = new \Sendmail(); + $mail->set_format("HTML"); $mail->set_from(ADMIN_WEB); $mail->mailto($this->getEmail()); $mail->set_subject(_("NOALYSS : Double authentification lien pour 2FA: OTP")); @@ -2080,20 +2085,27 @@ Voici votre code secret pour NOALYSS : $code /** * save in DB first */ - $message = "Bonjour, - + $message = "

Bonjour,

+

Afin de pouvoir utiliser la double authentification avec 2FA: OTP, pourriez-vous suivre ce lien et scanner le QRCode avec votre application android freeOTP ou Google Authenticator. - - Ce lien expirera le {$str_time}. +

+

Ce lien expirera le {$str_time}. +
+
+
+ + {$noalyss_url}/index.php?otp={$uuid} +

- - {$noalyss_url}/index.php?otp={$uuid} +

Merci d'utiliser NOALYSS +

+

Bien cordialement, - +

"; try {