PHP emailer program

Discussion in 'PHP' started by Lord Fire, Nov 10, 2007.

  1. #1
    plz tell me any script through which i can email the people with emails in text file
     
    Lord Fire, Nov 10, 2007 IP
  2. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what exactly are you looking for, please elaborate.
    sendmail / mail (check PHP.net) function can be used to achieve the desired results. Are you looking for a manual email option (form for you where you type in email id and it picks up text from different templates or you want a auto-email where all users (perhaps stored in database) are sent emails periodically and all you do is modify the text file that forms the body of the email.

    Need more info.

    Cheers
    GS
     
    pubdomainshost.com, Nov 11, 2007 IP
  3. Lord Fire

    Lord Fire Banned

    Messages:
    299
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i need a script in PHP that can send emails to 100 people in list
     
    Lord Fire, Nov 11, 2007 IP
  4. bobb1589

    bobb1589 Peon

    Messages:
    289
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    to people in the list ... the list is in the text file?
    separate each email by a new line in the text file...
    
    <?php
    
    $emails = "path_to_list.txt";
    
    $list = explode("\n",$emails);
    
    foreach($list as $to){
    $message = "insert message here...use \n for a new line";
    if(!mail($to,"Subject",$message,"FROM: your@email.com")){
         echo "Message could not be sent to ".$to."<br>";
    }
    
    }
    
    ?>
    
    PHP:
     
    bobb1589, Nov 11, 2007 IP
  5. Lord Fire

    Lord Fire Banned

    Messages:
    299
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    but email send to junk folder using this
     
    Lord Fire, Nov 11, 2007 IP
  6. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #6
    EMails may end up in junk folder due to the fact that your domain name (or IP address range) is not in recipients good books. It has nothing to do with the code.

    Thx
    GS
     
    pubdomainshost.com, Nov 12, 2007 IP