我需要发送存储在数据库中的多个电子邮件发送保存在数据库中的多个电子邮件
$mysqli = $this->connection(); //connect to db
$dati = $mysqli->query("SELECT * FROM feed where active='1'");//select emails
while ($resulta = $dati->fetch_array()) { //while to show
$email = $resulta['email']; //each mail
}
上面的代码是什么使用 IM,但我需要用邮件功能发送电子邮件的同时 外,如果发送返回正确实现的功能:
这是功能:
function feed_mail($id){
$mysqli = $this->connection(); //connect to db
$dati = $mysqli->query("SELECT * FROM feed where active='1'");//select emails
while ($resulta = $dati->fetch_array()) { //while to show
$email = $resulta['email']; //each mail
}
if(mail($email, $asunto, $html,$header)){
return true;
return false;
}
}
$电子邮件将被存储在数据库01的每个邮件$ asunto,$ html,$ header我没有在这里添加代码
所以我如何发送每封电子邮件?
怎么样?我发了 ? – Emilo 2015-04-05 09:15:12
阅读文章,你会现在它。添加标头,如$标头。=“CC:[email protected],[email protected],.. \ r \ n”; – AdamM 2015-04-05 09:27:26