0

我正在使用 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"] 等于一个有效的电子邮件地址,但我没有收到电子邮件

有任何想法吗?

4

1 回答 1

1

看起来它想要 AddAttachment 部分在其他所有内容之后并且就在 Send 函数之前

于 2013-10-10T16:56:45.977 回答