Mercurial > hg > ywww
view newsletter/newsletter_110301.php @ 6:077b0a0a3e6d
remaining originals according to dependency walk
author | Robert Boland <robert@markup.co.uk> |
---|---|
date | Thu, 16 Feb 2017 22:29:02 +0000 |
parents | |
children | 385ddd7c4b55 a67bf725e87b |
line wrap: on
line source
<?PHP include "../../private/db.php"; $myFile = "newsletterOutput"; $fh = fopen($myFile, 'w') or die("can't open file"); for ( $counter = 0; $counter <= 5200; $counter += 50) { $upper = $counter+51; $query1 = "select distinct Email from user u, userpref up where u.UserID = up.UserID and ReceiveEmail = 1 and u.UserID > $counter and u.UserID < $upper"; //echo $query1; $data = mysqli_query($link, $query1); fwrite($fh, date("d/m/y : H:i:s", time())); fwrite($fh, " Sent mail to:\n"); while($line = mysqli_fetch_assoc($data)) { $email=$line["Email"]; if (substr($email,0,1) != "@") { $message = "<html> <head> <title>YourNextRead Newsletter</title> </head> <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#232323\" align=\"center\"> <tbody><tr><td> <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\"> <tbody> <tr></tr> <tr> <td bgcolor=\"#232323\" width=\"15\"></td> <td bgcolor=\"#232323\"> <center><font face=\"verdana, sans-serif, arial\" color=\"#ffffff\" style=\"font-size:10px;\" size=\"1\"> Discover and share with YourNextRead. Having trouble viewing this email? See it <a rel=\"nofollow\" target=\"_blank\" href=\"http://www.yournextread.com/newsletter/mar0111.html\" style=\"color:#ffffff;\">online<font face=\"verdana, sans-serif, arial\" color=\"#ffffff\" style=\"font-size:10px;\" size=\"1\"></font></a>. To help stop our emails being seen as spam, please add <strong><span style=\"border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: rgb(0, 102, 204); cursor: pointer; \">newsletter@YourNextRead.com</span></strong> to your address book. <br><br> </font></center> </td> <td bgcolor=\"#232323\" width=\"15\"></td> </tr> <tr> <td colspan=\"3\" bgcolor=\"#232323\" ><A HREF=\"http://www.yournextread.com/\"><img src=\"http://www.yournextread.com/images/read/top_email.jpg\" style=\"border:0px;display:block;\" width=\"600\" height=\"63\" alt=\"\"></a></td> </tr> <tr> <td bgcolor=\"#ffffff\" colspan=\"2\"> <table width=\"600\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\"> <tbody> <tr> <td bgcolor=\"#594f43\"> <font face=\"verdana, sans-serif, arial\" color=\"#ffffff\" style=\"font-size:12px;\"> 1st March 2011 </font> </td> </tr> <tr> <td bgcolor=\"#f2b234\"> <font face=\"verdana, sans-serif, arial\" color=\"#232323\" style=\"font-size:20px; font-weight:bold;\"> YourNextRead - Even More Book Ideas! </font> <br> </td> </tr> </tbody> </table> </td> </tr> <tr></tr> <tr> <td bgcolor=\"#ffffff\" colspan=\"3\"> <table width=\"570\" cellpadding=\"10\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\"> <tbody> <tr> <td> <font face=\"verdana, sans-serif, arial\" color=\"#0000000\" style=\"font-size:12px;\"></font> <p style=\"font-family:verdana, sans-serif, arial;font-weight:100;color:#0000000;font-size:13px;line-height:14px;\"> We have been busy for the last month thinking of new ways to improve YourNextRead’s recommendations.</p> <p style=\"font-family:verdana, sans-serif, arial;font-weight:100;color:#0000000;font-size:13px;line-height:14px;\">The recommendations from our community (that's you!) are the most important part of our website and always will be. But we're getting more and more popular, and we're finding that some books have more recommendations than we can show! </p><p style=\"font-family:verdana, sans-serif, arial;font-weight:100;color:#0000000;font-size:13px;line-height:14px;\">To help give you as many ideas as possible, we have added a new rotation system for books with lots of recommendations. </p> <p style=\"font-family:verdana, sans-serif, arial;font-weight:100;color:#0000000;font-size:13px;line-height:14px;\"><a href=\"http://www.yournextread.com/\">Try it out</a> and <a href=\"mailto:feedback@yournextread.com\">let us know what you think!</a></p> <div style=\"border-bottom:solid;border-bottom-width:2px;border-bottom-color:#f2b234;height:1px;width:570px;margin-top:8px;margin-bottom:10px;\"></div> </p><p style=\"font-family:verdana, sans-serif, arial;font-weight:100;color:#0000000;font-size:13px;line-height:14px;\"> We also have some exciting new releases coming up soon, so keep your eyes peeled for our next newsletter... All the best from the YourNextRead team. </p> <p style=\"font-family:verdana, sans-serif, arial;font-weight:bold;color:#0000000;text-align:center;font-size:13px;line-height:14px;\"> Check out the YourNextRead recommendations for these bestsellers: </p> <p style=\"text-align:center;\"> <a href=\"http://www.yournextread.com/us/#!isbn=0307587959\"><img src=\"http://ecx.images-amazon.com/images/I/51vMkxhAVWL._SL160_.jpg\" height =\"100px\" width=\"70px\"/></a> <a href=\"http://www.yournextread.com/us/#!isbn=0470947802\"><img src=\"http://ecx.images-amazon.com/images/I/51n7yqvo5DL._SL160_.jpg\" height =\"100px\" width=\"70px\"/></a> <a href=\"http://www.yournextread.com/us/#!isbn=0849946158\"><img src=\"http://ecx.images-amazon.com/images/I/41EPLI2HNBL._SL160_.jpg\" height =\"100px\" width=\"70px\"/></a> <a href=\"http://www.yournextread.com/us/#!isbn=0756404738\"><img src=\"http://ecx.images-amazon.com/images/I/51ZQ%2BYN6EyL._SL160_.jpg\" height =\"100px\" width=\"70px\"/></a> <a href=\"http://www.yournextread.com/us/#!isbn=1400064163\"><img src=\"http://ecx.images-amazon.com/images/I/51BsGJZ989L._SL160_.jpg\" height =\"100px\" width=\"70px\"/></a></p> <div style=\"border-bottom:solid;border-bottom-width:2px;border-bottom-color:#f2b234;height:1px;width:570px;margin-top:8px;margin-bottom:10px;\"></div> <p><a href=\"http://www.facebook.com/YourNextRead/\"><img src=\"http://www.buttonshut.com/Facebook-Buttons/Facebook-Buttons-42-32-.gif\" border=\"0\"/></a> <a href=\"http://www.twitter.com/YourNextRead\" ><img src=\"http://www.twitterbuttons.com/upload/badges/02bb9f0627follow-us-1.gif\" border=\"0\"/></a><a style=\"float:right;margin-top:20px;\" href=\"http://www.amazon.com/?tag=bookwhack-20\" ><img src=\"http://g-ecx.images-amazon.com/images/G/01/gno/images/general/navAmazonLogoFooter._V169459313_.gif\" border=\"0\"/></a><br/></p> </td> </tr> </tbody> </table> </td> </tr> <tr> <td colspan=\"3\" bgcolor=\"#232323\"><br> <font face=\"arial, verdana, sans-serif\" color=\"#ffffff\" size=\"1\" style=\"font-size:10px;\"> Terms and Conditions <br><br> This is a genuine email from <span style=\"border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: rgb(0, 102, 204); cursor: pointer; \">YourNextRead</span>. However, if you receive an email which you are concerned does not legitimately originate from us, you can report it via <a rel=\"nofollow\" target=\"_blank\" href=\"mailto:feedback@yournextread.com\" style=\"color:#ffffff;\"><span class=\"yshortcuts\">emailing us</span></a> before deleting it. <br><br> You have received this email because you have opted in to receive news, updates and offers from YourNextRead <br><br> You can <a rel=\"nofollow\" target=\"_blank\" href=\"http://www.yournextread.com/user/unsubscribe.php?email=$email\" style=\"color:#ffffff;\"><span>unsubscribe here</span></a>, however as the majority of our communications are via email, you'll be missing out. <br> </font> </td> </tr> </tbody></table> </td></tr></tbody></table></html>"; $header="from: YourNextRead <newsletter@yournextread.com>\nContent-Type: text/html; charset=iso-8859-1"; $to=$email; $subject="Even More Book Ideas!"; $sentmail = mail($to,$subject,$message,$header); fwrite($fh, "$email\n"); } } sleep(60); } fwrite($fh, "COMPLETE"); fclose($fh);