Получите электронное письмо после регистрации
Эй, ребята, мне было интересно, есть ли способ получить электронное письмо после регистрации пользователя. Заранее спасибо.
Что я уже пробовал:
<?php $servername = "xxxxx"; $username = "xxxxx"; $password = "xxxxxx"; $db = "xxxxxx"; // Create connection $conn = mysqli_connect($servername, $username, $password,$db); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } if(isset($_POST['submit'])){ $un = $_POST['u_name']; $em = $_POST['email']; $ps = $_POST['pswd']; $cps = $_POST['cpswd']; $p = $_POST['phone']; $bd = $_POST['address']; $fname = $_POST['fname']; $lname = $_POST['lname']; $binp = $_POST['binp']; $amm = $_POST['amm']; $bname = $_POST['bname']; $acc = $_POST['acc']; $rnumber = $_POST['rnumber']; $comments = $_POST['comments']; $sql = "INSERT INTO registration_form (username,email,password,phone,Address,fname,lname, binp, amm, bname, acc, rnumber, comments) VALUES ('$un','$em','$ps','$p','$bd','$fname','$lname','$binp','$amm','$bname','$acc','$rnumber','$comments')"; if($ps==$cps){ if (mysqli_query($conn, $sql)) { ?> <script type="text/javascript">alert("Your account is ready! One of our agents is going to review the case."); window.location = "https://xxxxxxx"; </script> <?php } else { $error = "Error: " . mysqli_error($conn); ?> <script type="text/javascript"></script> <script type="text/javascript">alert("<?php echo $error; ?>");</script> <?php } } else { ?> <script type="text/javascript">alert("Please Enter Correct Password and Try Again!");</script> <?php } } ?>