发送邮件但不接收时获得成功

时间:2018-11-08 00:17:57

标签: php mamp

我已尽一切努力,但收件箱中仍未收到邮件

<?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."; 
}

感谢您的帮助:)

0 个答案:

没有答案