Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

Mass Email to Users

edited April 2012 in Questions

How do I send a mass email to my users? If this is not possible from Vanilla, is there a plugin for this?

Tagged:

Best Answers

Answers

  • get a list

    SELECT `Email`
    FROM `GDN_User`
    
    put  the list into  a file 
    that looks like this called maillist.txt
    
    joe@none.com
    happydude@none.com
    unhappydude@none.com
    moe@none.com
    larry@none.com
    curly@none.com
    

    the program

    happydudemailer.php

    <?php
    
    $filename = "maillist.txt";
    
    $fp = fopen($filename, "r");
    if($fp)
    {
       while(!feof($fp))
       {
          $to = fgets($fp);
         $subject = "Hi!";
        $body = "Hi,\n\nHow are you?";
       if (mail($to, $subject, $body)) {
         echo $to;
         echo("<p>Message successfully sent!</p>");
          } else {
       echo("<p>Message delivery failed...</p>");
          }
    
    
       }
    }
    
    
    
    ?>
    

    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

    UnderDog
  • you could even do a selective message to users who haven't logged in since the beginning of the year by creating a mailing list with these results.

    SELECT Email FROM GDN_User WHERE DateLastActive < "2012-01-01"

    <?php
    $filename = "maillist.txt";
    $fp = fopen($filename, "r");
    if($fp)
    {
    while(!feof($fp))
    {
    $to = fgets($fp);
    $subject = "Hi!";
    $body = "Hi,\n\nI see you have not logged in for a while, why not?";
    if (mail($to, $subject, $body)) {
    echo $to;
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>");
    }
    }
    }
    ?>
    

    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

    UnderDog
  • Honestly, I could do all that if I wanted to. I just wanted to know if there was an in-built feature or plugin for that.

    Something nice and easy in the backend. Perhaps you could build one ;) My vanilla plugin development skills are not all that great.

  • peregrineperegrine MVP
    edited April 2012

    happydude said: Honestly, I could do all that if I wanted to. I just wanted to know if there was an in-built feature or plugin for that.>

    Sorry I misinterpreted your message

    How do I send a mass email to my users? >

    see above, but you could have done that if you wanted to. Apparently you don't want to.

    If this is not possible from Vanilla, is there a plugin for this?>

    no.

    Something nice and easy in the backend. Perhaps you could build one ;) My vanilla plugin development skills are not all that great.>

    the above is already easy. maybe somebody else will produce a plugin. it doesn't interest me. Maybe you could hone up on your skills "if you wanted to" http://vanillawiki.homebrewforums.net/index.php/Main_Page

    check out the various references to plugins.


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

    422UnderDoghappydude
  • 422422 Developer MVP

    I couldnt Have done that, thankyou Peregrine

    422 Real Estate Australia , now open Check it out

    peregrineUnderDog
  • peregrineperegrine MVP
    edited April 2012

    @422 I may have overreacted. but others came to the rescue :> I guess I tire of people who don't say thank you or don't click the like button or don't accept buttons, to at least signify that they appreciate in some samll way that you tried to solve their problem. Not doing these things seems to signify that the person asking the question, couldn't care less about your time and effort.


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

    422ahmedaladdin
  • @peregrine I am very sorry. I didn't mean to come across that way, and I actually appreciate your responses.

    @fh111, @422 and @Dan Devine Thanks for your contributions.

    peregrine
  • peregrineperegrine MVP
    edited April 2012

    @peregrine I am very sorry. I didn't mean to come across that way, and I actually appreciate your responses.>

    Accepted, no worries (as they say down south).


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

    UnderDoghappydude
  • hbfhbf wiki guy? MVP

    peregrine said:

    @peregrine I am very sorry. I didn't mean to come across that way, and I actually appreciate your responses.>

    Accepted, no worries (as they say down south).

    we say that in the west too ;)

  • West Sydney or West Texas.


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

  • hbfhbf wiki guy? MVP

    peregrine said: West Sydney or West Texas.

    west coast (California)

    UnderDog
  • GaryFunkGaryFunk Senior Application Developer ✭✭

    I know I'm late to the game, but..

    SELECT `Email`
    FROM `GDN_User`
    INTO OUTFILE 'maillist.txt'
    
    vrijvlinder
Sign In or Register to comment.