多个邮件的php邮件功能错误

时间:2015-08-11 09:51:52

标签: php mysql email

意图是将电子邮件发送给该部门的30人。 但我收到一条错误信息

$queryy = mysql_query("SELECT eemail FROM employee WHERE edept='a'");
            while ($rowy = mysql_fetch_array($queryy)) 
            {

                $to      = $rowy['eemail'];
                $subject = 'Evacuate Department!';
                $message = 'Evacuate The Department Fast';
                $headers = 'From: teamavengers' . "\r\n" .
                'X-Mailer: PHP/' . phpversion();

                mail($to, $subject, $message, $headers);
            }

显示的错误消息为:

  

mysql_fetch_array()期望参数1为resource,boolean ......

请帮我处理它

0 个答案:

没有答案