function send_mail($to_email, $to_name, $subject, $content, $from_name = '') { $table = array("account"); $db = new database(); $query = $db->createQueryAll($table); $db->setQuery($query); $result1 = $db->loadAllRow(); //var_dump($result1); $pass = encrypt_decrypt('decrypt', $result1[0]['pass']); //var_dump($pass); //tài khoản gmail dùng để gửi mail $from_email = $result1[0]['name']; // Reply to this email $from_email_pass = $pass; return send_gmail($from_email, $from_email_pass, $to_email, $to_name, $subject, $content, $from_name); }
alert(loi); return false; } } </script> <?php if (isset($_POST["tieude"])) { //kiem tra kh đăng nhập chưa if (!isset($_SESSION["email"])) { echo "<script>alert('Bạn Phải Đăng Nhập Trước Khi Liên Hệ');</script>"; } else { $tieude = $_POST["tieude"]; $noidung = $_POST["noidung"]; $email = $_SESSION["email"]; include_once "send_gmail.php"; send_gmail("*****@*****.**", "nguyenngocquy", "test.gmail", $tieude, $noidung, $email); echo "<script> alert('Cảm Ơn Bạn Đã Phản Hồi');</script>"; } } ?> <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> <form action="tranglienhe.php" method="post" enctype="multipart/form-data" name="form1"> <table width="70%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#E6F6D9"> <tr bgcolor="#D7F2C5"> <td colspan="2" bgcolor="#006699"><div align="center" class="style4 style1"> Liên Hệ </div></td> </tr> <tr>