PHPMailer电子邮件没有发送,但没有错误

时间:2013-10-10 16:03:25

标签: php email

我正在使用PHPMailer并使用此PHP代码发送电子邮件:

$email = new PHPMailer();

            while($result2=mysql_fetch_array($rs2))
            {
                $email->AddAttachment( $result2["attachment"] , basename($result2["attachment"]) );
            }

            $email->From      = 'Integra Digital';
            $email->FromName  = $result["emailfrom"];
            $email->Subject   = $result["subject"];
            $email->Body      = $result["message"];

            $email->AddAddress($result["emailto"]);
            $email->IsHTML(true);

if(!$email->Send())
            {
                echo "<strong>Mailer Error: </strong>" . $email->ErrorInfo;
            }
            else
            {
                echo '<strong>Email sent to: </strong>' .implode(',',$emails_list). '<br/ >';
            }

$ result [“emailto”]等于有效的电子邮件地址,但我没有收到电子邮件

任何想法?

1 个答案:

答案 0 :(得分:1)

看起来它想要AddAttachment部分在其他所有部分之后和Send函数之前