Пример #1
0
            $tag = "";
            $content_Subject = "RealEstate_HoaPhuong.com";
            $content_Body = "\r\n\t\t\t\t<div id='yiv1540714745'>\r\n\t\t\t\t\tXin chào, " . $checkstatus['hoten'] . "\r\n\t\t\t\t\t<br><br>\r\n\t\t\t\t\tWebsite RealEstate_HoaPhuong.com có nhận được yêu cầu thay đổi mật khẩu cùa quý khách vào ngày " . date('d-m-Y , h:i:s') . "\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tMật khẩu đã được thay đổi:<b style='color:#336699;'>" . $random . "</b>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tQuí khách vui lòng quay trở lại trang web để đăng nhập lại.\r\n\t\t\t\t\t<br>\r\n\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t__________________________________________________\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tBộ phận kỹ thuật:\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tĐiện thoại : (08) 38777939. - Fax : (08) 62602665\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\tE-mail: support@realestate_hoaphuong.com\r\n\t\t\t\t\t<br>\r\n\t\t\t\t</div>";
            for ($i = strlen($txtEmail) - 9; $i < strlen($txtEmail); $i++) {
                $tag .= $txtEmail[$i];
            }
            if ($tag == "yahoo.com") {
                $type = 1;
            } else {
                if ($tag == "gmail.com") {
                    $type = 2;
                } else {
                    $type = 3;
                }
            }
            $rs = SendEmail::send_Email($txtEmail, $content_Subject, $content_Body, $type);
            //echo "<br>rs=".$rs;
            if ($rs == true) {
                echo "sendmail trong sasas";
                header("Location:index.php?email=" . $txtEmail . "&send=success");
            } else {
                header("Location:index.php?email=" . $txtEmail . "&send=failed");
            }
        } else {
            header("Location:index.php?email=" . $txtEmail . "&send=failed&changepass=failed");
        }
    } else {
        header("Location:index.php?email=" . $txtEmail . "&send=failed&checkemail=failed");
    }
}
?>