Results 1 to 2 of 2

Thread: PHP emailer question

  1. #1
    Join Date
    Mar 2006

    PHP emailer question


    how would I use php mailers to send an email to all emails i a tablethat meet the conditions of a quert that I set

    I know how to send an email to a single person but getting it to loop through all the email address and send to each person I have no clue. I did some google seaching and I found nothing to do what I want.

    I want to run query that will get email addresses from a data base.

    PHP Code:
    $get_email =  mysql_query("SELECT email_address FROM usersWHERE last_login >  (CURdate() - INTERVAL 180 DAYS)");

    while (
    row_email fetch_assoc($get_email){

    $email_email Addresses $row_email['email_address'];

    ///code to send email ?????????? 

  2. #2
    Join Date
    May 2006
    the netherlands
    the code is exactly the same, because everytime you go through the loop you only send the mail to one person. (unless you want to CC everyone).
    Just make sure you're using the right variable.
    Also, make sure the query doesn't fail.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles