-
Notifications
You must be signed in to change notification settings - Fork 0
/
cron.php
28 lines (26 loc) · 883 Bytes
/
cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
include("connect.php");
$rs=mysql_query("select * from soe_newsletter where month ='".strtotime(date("m")."/01/".date('Y'))."'");
if(mysql_num_rows($rs)<=0)
die();
$rs=mysql_query("select * from soe_newsletter_users");
while($row=mysql_fetch_array($rs))
{
$rs1=mysql_query("select * from soe_newsletter where month ='".strtotime(date("m")."/01/".date('Y'))."' and gender='".$row['gender']."'");
$row1=mysql_fetch_array($rs1);
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->Subject ="ShoeBreeze Monthly Newsletter - ".$row['title'];
$mail->Body = $description;
$mail->From = "[email protected]";
$mail->FromName="ShoeBreeze.com";
$mail->AddAddress($row['email']);
$mail->AddBCC('[email protected]');
$mail->AltBody ="Your mail is not supporting html format";
$mail->IsMail();
if(!$mail->Send())
{
$msg =$mail->ErrorInfo;
}
}
?>