Find the answer to your Linux question:
Results 1 to 2 of 2
we send our clients some online newspaper. For sending newspapers we use a php script that use php mailier. And we save our newspaper mail list members mail addresses on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2003
    Posts
    2

    mysql and phpmailer problem


    we send our clients some online newspaper. For sending newspapers we use a php script that use php mailier. And we save our newspaper mail list members mail addresses on a myqsl table. When the number of the list members increase, the other people who are not in the list recieve our newspaper. I can not get that which one creates the problem, mysql or phpmailer? But I guess the cache of mysql holds the old names and mistakenly sends mails the old members or the other lists members. So how can I flush the mysql caches? My mysql version is 3.23.32. And I tried the command FLUSH QUERY CACHE but it does not work. Have any one encounter problem like this one? If so what can be the solution? Thanks...

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Why do you use phpmailer...Try this insted. If you have all you reciptients in a database table and the adresses in a separate column.

    Code:
    $query    = "select email from mailinglist";
    $result   = mysql_query($query) or die ("\nFailed to execute SQl-query to gather emailreciptients\n");
    
    while ($row = mysql_fetch_array($result)) {
    		$MAILADRESS = $row[0];
    
    mail("$MAILADRESS", "New information from our website, created by andutt@utterberg.com", "$MESSAGE", "$headers");
    }

    This works fine...
    Regards

    Andutt

Posting Permissions

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