function isMailExist( $mail='' ) { //echo "---> mail : " . $mail . "<br>"; $client = new client(); return ( $client->loadByMail( $mail ) ) ? true : false; //return false; }
// Récupération des informations passées en paramètres $mon_action = $_POST["mon_action"]; $anti_spam = $_POST["as"]; //echo "--- mon_action : " . $mon_action . "<br>"; //echo "--- anti_spam : " . $anti_spam . "<br>"; $affichage_envoi_ok = "none"; $affichage_envoi_erreur = "none"; // Demande du mot de passe if ( ( $mon_action == "mdp" ) && ( $anti_spam == "" ) ) { $client = new client(); // Tentative de chargement du client grâce à son mail if ( $client->loadByMail( $_POST["mail"] ) ) { $_to = $client->mail; //$_to = "*****@*****.**"; $sujet = "ADanimalerie.com - Mot de passe"; //echo "Envoi du message à " . $_to . "<br>"; $entete = "From:AD animalerie <*****@*****.**>\n"; $entete .= "MIME-version: 1.0\n"; $entete .= "Content-type: text/html; charset= iso-8859-1\n"; //$entete .= "Bcc: franck_langleron@hotmail.com\n"; $corps = ""; $corps .= "Bonjour " . utf8_encode( $client->prenom ) . ",<br><br>"; $corps .= "Voici vos identifiants :<br>"; $corps .= "Login : <b>" . $client->mail . "</b><br>";