Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Emailing Website Owners

  1. #1
    Join Date
    Jan 2005
    Location
    Stockbridge, GA
    Posts
    64

    Default Emailing Website Owners

    Has anyone creating a script for emailing website owners?

    I have recently converted over to IndexU and imported my old database and want to email all the website owners, the ID and password for their website.

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    It's included. Go to admin panel > tool > mailing list. Create a message, then send. There you'll get 4 options: mailing list, webmaster, editor, or all.

    Just select webmaster.

    Btw, it's just simple mailing script. It has no advance detection for delivery and bounching message.

  3. #3
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    great, but what if I want to email only a certain category webmasters (not all)?

    I know I am always asking selly Qs, but in my case I need that.

    Thanx in advance

  4. #4
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    great, but what if I want to email only a certain category webmasters (not all)?
    No. I will email to all webmaster.

  5. #5
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    I query the database to get specific emails, (eg. i query to find all listings on my site without a website and send them an email to say im a designer and get in contact for a website quote)

    It jsut returns a list of emails, and i used that and send it in my email client... maybe that would work for you?
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  6. #6
    Join Date
    Jan 2005
    Location
    Stockbridge, GA
    Posts
    64

    Default

    Can you use variables in the email such as ID or password?

  7. #7
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Quote Originally Posted by inspireme
    I query the database to get specific emails, (eg. i query to find all listings on my site without a website and send them an email to say im a designer and get in contact for a website quote)

    It jsut returns a list of emails, and i used that and send it in my email client... maybe that would work for you?
    Yes that would, I have a comunity directory, so sometimes I want to send email to certain businesses about updated in their fields.
    I use Email Delux for my newsletter, so extracting the emails will be a good thing, if I only know the syntax

    Can you please help me, get emails for category_id=x

    TIA

    Hani

  8. #8
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    How much do you know about sql? you should be able ot work this little script out, I will comment it so you can understand better... im not sure how you want it to output the email addresses. I set this up so it automatically emails using php mail command, but im always a bit nervous about that - this iwll jsut output email addresses, and link_id and password wouldnt be much trouble either... you would have to edit it... but its somethign to get you started.

    jsut save this as email.php or somethign... remember not to let peopel find it!!!

    Code:
    <?php
    
    
    
    function hookUpDb(){
    
    //these are the same as in your application.php file
      Global $connection;
          $host = 'localhost';
        $user = ' username';
        $password = 'password';
        $db = 'db name';
    
          if(mysql_connect($host,$user,$password)){
    
           $connection = mysql_connect($host,$user,$password);
    
           mysql_select_db($db,$connection);
    
           return $connection;
    
        }else{
    
           print("<b>Sorry, cannot connect to the database.</b>");
    
        }
    
    }
    
    // Ignore these bits
    
    function doQuery($sql){
    
     Global $connection;
    
        hookUpDb();
    
    
    
        if(!mysql_query($sql,$connection)){
    
        return mysql_error();
    
        }
    
    
    
    return true;
    
    }
    
    
    
    function doQueryResult($sql){
    
    Global $connection;
    
        hookUpDb();
    
        if($sql != ""){
    
        $result = mysql_query($sql,$connection);
    
            $item = array();
    
            while($item = mysql_fetch_array($result)){
    
            $items[] = $item;
    
            }
    
        return $items;
    
        mysql_free_result($result);
    
        } else {
    
        print("Need correctly formed SQL that returns a resultset.");
    
        }
    
    }
    
    
    
    // this is where you choose what to collect from the database
    // to make it easier for you change the variable to the cat_id you want to email
    $cat_id = 18;
    
    
    // if you want search ALL categories then use this instead :
    //   $sql_1 = "SELECT * FROM idx_link "; 
    
        $sql_1 = "SELECT * FROM idx_link WHERE category_id=$cat_id or cat1=$cat_id or cat2=$cat_id"; 
        $result = doQueryResult($sql_1);
     
    
    
    
    if(is_array($result)){
    
        foreach($result as $found){
    	
    	// this is where it will output hte information to your screen for copy pasting.
    
    echo ($found['email']);
    
    echo (';');
    echo ("<br>");
    
    // that just outputs all the emails in the category you suggested. 
    // if you wanted to send them a link ID and password, you could save the following as a .csv file and 
    // import it into a spreadsheet, each field is seperated by a | so you can setup some mail merge or however you want to do it...
    
    
    /*
    echo ("$found['email']");
    echo (' | ');
    echo ("$found['password']");
    echo (' | ');
    echo ("$found['link_id']");
    echo (' | ');
    echo ('/n/n');
    */
    
    }
    }
    
        // very rough, but you should get some ideas to adapt as you like.
    
    ?>
    you just need ot chaneg the red bits.
    Last edited by inspireme; 08-14-2006 at 02:51 PM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  9. #9
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Thanx
    This is Greek to me, I would tell when a semicolon is missing, but thats almost as much as I know


    When I try it as is I get a (simple) parse error in line 94

    if I comment line 88 and uncomment line 92 i get this:

    Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /var/www/vhosts/yahala.com/httpdocs/ydir/mmail.php on line 106

  10. #10
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    honestly i never tested it - will have a look and post where i went wrong
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  11. #11
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    Thanx, I really appreciate that, take your time

  12. #12
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    try it now
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  13. #13
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    ?
    Same error, why wouldnt it be? unless ofcourse you are a magician or a hacker I dought the second as you dont even know my website name.
    Oh oh, you do, all the world does

    anyway its the same error unless you need me to use the original code

  14. #14
    Join Date
    Jul 2002
    Location
    Riyadh, Saudi Arabia
    Posts
    236

    Default

    same error with original code

  15. #15
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    I edited my post, have you copied pasted it as i have it now?

    anyway, you can fix it yourself, i missed the semi colon off from line 88 and it should be two brackets } at the end. the errors you mentioned are the same as i had, and i corrected them in the code i posted.

    I also made a change so it now searches for links that may have the cateory id your searching for set as a second or 3rd cateogry instead of just the first.

    Anyway, i tried what i have posted again and it works, the only thing that would stop it working is that you dont have the right database settings or that the category id number on line 88 is set to a number that doesnt have links in... try copy the code and paste it in again
    Last edited by inspireme; 08-14-2006 at 02:52 PM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

Similar Threads

  1. Email all link owners ?
    By ideavirus in forum v3.2
    Replies: 5
    Last Post: 12-12-2003, 11:38 AM
  2. mail to link owners
    By lewisw in forum v5.x
    Replies: 0
    Last Post: 08-14-2003, 09:40 AM
  3. Members & Owners of Indexu Products
    By Hart_House in forum v5.x
    Replies: 9
    Last Post: 10-26-2002, 09:41 AM
  4. Email all list owners?
    By Phil Latio in forum v5.x
    Replies: 1
    Last Post: 01-24-2002, 07:22 PM
  5. Replies: 5
    Last Post: 11-18-2001, 08:14 AM

Posting Permissions

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