• guimail.php
  • /
1 <?php
2 mysql_connect(
"localhost","root","") or die("Khong the ket noi co so du lieu.");
3 mysql_select_db(
"gianhang");?>
4 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns=
"http://www.w3.org/1999/xhtml">
6 <head>
7     <meta http-equiv=
"content-type" content="text/html; charset=utf-8" />
8     <meta name=
"description" content="rao vat bac ninh, mua ban bac ninh, rao vat bat dong san bac ninh, laptop bac ninh, may tinh bac ninh, oto xe may bac ninh, dien thoai bac ninh"/>
9     <meta name=
"keywords" content="rao vat bac ninh, mua ban bac ninh, rao vat bat dong san bac ninh,dien thoai bac ninh "/>
10     <meta name=
"copyright" content="Copyright (C) www.15giay.vn" />
11     <meta name=
"geo.placename" content="VIET NAM" />
12     <meta name=
"geo.position" content="15;107" />
13     <meta name=
"geo.region" content="VIET NAM" />
14     <meta name=
"googlebot" content="rao vat bac ninh, mua ban bac ninh, rao vat bat dong san bac ninh, laptop bac ninh, may tinh bac ninh, oto xe may bac ninh, dien thoai bac ninh" />
15     <meta name=
"google-site-verification" content="cAvIF8_ffkn3qz5E38vNiYNw3xytW3a2973zErL27sw" />
16     <meta name=
"msvalidate.01" content="6809E834503111E0DE41656FE9C7C147" />
17 <meta name=
"eclick_verify" content="56b46133-92e5441c-ff72f0b9-6ecaf4b6" />
18 <meta property=
"og:title" content="Cho quoc te, mang thuong mai dien tu " />
19 <meta property=
"og:description" content="rao vat bac ninh, mua ban bac ninh, rao vat bat dong san bac ninh, laptop bac ninh, may tinh bac ninh, oto xe may bac ninh, dien thoai bac ninh" />
20 <meta property=
"og:image" content="http://15giay.vn/images/qc2.jpg"/>
21 <meta property=
"og:url" content="http://localhost/" />
22     <title>...</title>
23 </head>
24 <body>
25 <?php
26 require_once(
'class.phpmailer.php');
27 $mail =
new PHPMailer();
28 $mail->IsSMTP();
// telling the class to use SMTP
29 $mail->Host =
"smtp.gmail.com"; // SMTP server
30 $mail->SMTPDebug =
2; // enables SMTP debug information (for testing) // 1 = errors and messages // 2 = messages only
31 $mail->SMTPAuth =
true; // enable SMTP authentication
32 $mail->Host =
"smtp.gmail.com"; // sets the SMTP server
33 $mail->Port =
465; // set the SMTP port for the GMAIL server
34 $mail->Username =
"shopcantho.vn@gmail.com"; // SMTP account username
35 $mail->Password =
""; // SMTP account password
36
37 $mail->SetFrom(
'shopcantho.vn@gmail.com', 'shopcantho.vn');
38
39 $mail->AddReplyTo(
"shopcantho.vn@gmail.com","shopcantho.vn");
40 ?>
41 <?php
42 $sql=mysql_query(
"SELECT * FROM user_shop order by id ASC");
43 while
($row=mysql_fetch_array($sql))
44 {?>
45 <?php
46 $body=
"<b>Thông tin khuyến mại</b><br>Chào:".$row['user']."<br>Sàn thương mại điện tử 15giay.vn gửi đến các thành viên chương trình khuyến mại giảm giá đăng banner và sản phẩm<br><b></b><br><b></b><br><b>Mọi chi tiết xin liên hệ:</b><br><b>Phone: 0983 055 588</b><br><b>Email: hotro@15giay.vn</b><br><b>Yhaoo: danastar_vn</b>";
47 $mail->Subject =
"Khuyen mai phi tao gian hang cho thanh vien 15giay.vn";
48 $mail->AltBody =
"To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
49 $mail->MsgHTML($body);
50 $address = $row[
'email'];
51 $mail->AddAddress($address, $row[
'user']);
52 if
(!$mail->Send())
53 {
54   echo
"";
55 }
else
56 {
57   echo
"Da gui den email:".$row['email'];
58 }
59 ?>
60 <?}?>
61 </body>
62 </html>



Full source code website bán hàng thương mại điện tử gần giống shopee 467.254 lượt xem

Gõ tìm kiếm nhanh...