Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Mass Mailer

  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Mass Mailer

    Ok, i have a table in my database with 7k emails, i want to send them all out, thats the first problem.

    Would this code be sufficient in doing so?

    PHP Code:
    $query "SELECT * FROM emailslastages";

    $result mysql_query($query);

    $num mysql_num_rows($result);



    for(
    $i=0$i<=$num$i++) {



      
    $email mysql_result($result$i"email"); // The email in the database...

      
    $subject "Dark Visions"// Apply your subject

      
    $msg "We are proud to announce the release of Darkvisions.net,";

      
    $msg.= "\n";

      
    $msg.= "Dark Visions is a brand new MMORPG that has just launched publicly! In this game you can battle monsters, buy weapons and armor, and go on quests!\n";

      
    $msg.= "Soon to come is: Playershops, More quests, PvP, Clans, and much much more!\n";

      
    $msg.= "\n";

      
    $msg.= "If you would come and try out Dark Visions im sure you will be pleased, we have got over 200 players in just 1 day! Come join our ever-growing community!\n";

      
    $msg.= "\n";

      
    $msg.= "http://darkvisions.net/\n";

      
    $msg.= "\n";

      
    $msg.= "-Administration\n";

      
    $headers ="From: admin@darkvisions.net"// Apply your headers



      
    if($i 20) { echo "\n\n<p>Zzz...</p>\n\n"sleep(10); }



      if(
    mail($email$subject$msg$headers)) {

        echo 
    "<b>".number_format($i)."</b>: ".$email."<br>\n";

      } else {

        echo 
    "<b>".number_format($i)."</b> FAILED: ".$email."<br>\n";

      }




    If not could you please advise me on what to change...

    Second problem...

    It takes FOREVER to send even half of these emails... could someone point me in a direction that could possibly not slow the hell outta my computer, and not take sooo long... maybe cronjobs? i dunno.. something rather than going to this file and waiting for hours and hours... thanks a lot!

  • #2
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts
    *bump*

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts
    come on people!

  • #4
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts
    nobody knows anything i guess?

  • #5
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I am not sure how to answer your question, but you can Google for this & get programs & companies that offer mass mailing services for a price...

    http://www.google.com/search?client=...=Google+Search

  • #6
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts
    nevermind, i made one myself.. it only took a couple minutes to send all 7k emails...

    PHP Code:
    <?



    include("Login_System_v.2.0/include/session.php");

    $emailquery mysql_query("SELECT * FROM emailslastages ");


    while(
    $emailrow mysql_fetch_array($emailquery)){




      
    $email $emailrow['email']; // The email in the database...

      
    $subject "Dark Visions"// Apply your subject

      
    $msg "We are proud to say that Dark Visions has been moved to a new server, and is operational again!,\n";

      
    $msg.= "\n";

      
    $msg.= "For those of you who never have joined yet, please stop by and check us out! We've made some great updates, with much much more coming!\n";

      
    $msg.= "\n";

      
    $msg.= "Some latest updates include the release of Playershops, and Clans, the playershops allow you to sell items to other people, and the clans allow you to get together with friends and plot against other people!\n";

      
    $msg.= "\n";
      
      
    $msg.= "Things soon to come: Sub-Classes for every race, 3 for each race, or 18 classes in total. PvP, which is Player vs Player... You will be able to draft an army and attack other members in the game! Clan upgrades... Soon you will be able to use the clan bank, and with that money you will be able to buy
      a clan army, and clan upgrades... with those you can attack other clans! We also have skills in the making.. 9 skills in fact, some you may never have seen before! These are just some of the new updates going to happen within the next month, so come by and check us out!\n"
    ;

      
    $msg.= "\n";

      
    $msg.= "If you would come and try out Dark Visions im sure you will be pleased, we have got over 800 players in just 1 month! Come join our ever-growing community!\n";

      
    $msg.= "\n";

      
    $msg.= "http://darkvisions.net/\n";

      
    $msg.= "\n";

      
    $msg.= "-Administration\n";

      
    $headers ="From: admin@darkvisions.net"// Apply your headers


      
    if(mail($email$subject$msg$headers)) {

        echo 
    "<i>ID: ".$emailrow['id']."</i> <b>Email was sent to</b>: ".$email."<br>\n";

      } else {

        echo 
    "<i>ID: ".$emailrow['id']."</i> <b>Email could not be sent to</b> FAILED: ".$email."<br>\n";

      }



    }



    ?>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •