我已尽一切努力,但收件箱中仍未收到邮件
<?php
$conn = new PDO("mysql:host=localhost;dbname=xxx", "xxx", "xxx");
$sql="select email from email";
foreach($conn->query($sql, PDO::FETCH_ASSOC) as $simos){
$mail=mail($simos['email'],$_POST['subject'],$_POST['msg']);
echo $simos['email'];
if($mail){
echo "success";
} else {
echo "failed.";
}
感谢您的帮助:)