setQuery("SELECT * FROM auth_users WHERE auth_users.email='$emailuser'"); $checkmail->execute(); if(!empty($checkmail->getColumnVal("id"))) { $varmailrepeat='Y'; ?> query($query); $inserttrue='Y'; // Chiudi la connessione al database $mysqli->close(); //Now include the following following files based //on the correct file path. Third file is required only if you want to enable SMTP. require 'phpmailer/src/Exception.php'; require 'phpmailer/src/PHPMailer.php'; require 'phpmailer/src/SMTP.php'; //mail to client $mail = new PHPMailer(true); try { $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = $mailhost; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = $mailusername; // SMTP username $mail->Password = $mailpassword; // SMTP password $mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted $mail->Port = $mailport; $mmessage="mailnewuser"; include('include/mailnewuser.php'); // Email body content $htmlContent = $mailmessage1; $mail->From = $fromaddresssmail; $mail->FromName = 'CIMAC Application Form System'; $mail->addAddress($emailuser); // Add a recipient $mail->Subject = "Creazione Nuovo Utente"; $mail->Body = $htmlContent; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); // echo 'Message has been sent'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } }} ?>
Hai già un account? / Already have an account ? Log in