电子邮件使用PHPMailer发送到Gmail帐户,但不发送到Web服务器上的Yahoo帐户

时间:2018-01-19 07:30:14

标签: email smtp localhost phpmailer yahoo

我正在使用PHPMailer类向其他帐户发送电子邮件。它只发送到Gmail帐户,但不发送到雅虎帐户。但是在localhost上运行正常。在我做了一些更改后,它在前一天工作正常,现在它没有向雅虎帐户发送电子邮件。

注意:上面的问题是在Web Server中,Localhost很好。

以下是我的代码。

        $mail = new PHPMailer;
        $mail->SMTPOptions = array('ssl' => array('verify_peer' => false, 
                'verify_peer_name' => false, 'allow_self_signed' => true));

        // $mail->SMTPDebug = 4;                           
        $mail->IsMail();
        $mail->Host = 'bmstestn@server2.navicosoft.com';
        $mail->SMTPAuth = true;
        $mail->Username = 'bmstestn@server2.navicosoft.com';
        $mail->Password = 'Haroon.Iqbal3';
        $mail->SMTPSecure = 'tls';
        $mail->Port = 587;

        $mail->setFrom('bmstestn@server2.navicosoft.com', 'Masterect');
        $mail->addAddress('account@yahoo.com', 'Name');
        $mail->isHTML(true);      

        $message = "Hi";                           // Set email format to HTML

        $mail->Subject = 'Masterect Order Confirmation';
        $mail->Body    = $message;
        $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

        if(!$mail->send()) {
            echo 'Message could not be sent.';
            echo 'Mailer Error: ' . $mail->ErrorInfo;
        } 
        else {
                echo "sent";
        }







[Fri Jan 19 15:58:23.912833 2018] [authz_core:error] [pid 23055:tid 140635915826944] [client 170.130.37.42:47835] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini, referer: http://www.bmstest.net/
[Fri Jan 19 09:33:20.429221 2018] [authz_core:error] [pid 112688:tid 140635966183168] [client 158.69.116.60:52558] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini
[Fri Jan 19 09:33:17.126644 2018] [cgid:error] [pid 112688:tid 140635991361280] [client 158.69.116.60:52472] AH01265: attempt to invoke directory as script: /home2/bmstestn/public_html/cgi-bin/
[Fri Jan 19 09:33:16.124489 2018] [authz_core:error] [pid 112688:tid 140636083681024] [client 158.69.116.60:52453] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini
[Fri Jan 19 09:33:15.106902 2018] [authz_core:error] [pid 112689:tid 140636050110208] [client 158.69.116.60:52420] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini
[Fri Jan 19 09:33:07.864161 2018] [authz_core:error] [pid 112688:tid 140636058502912] [client 158.69.116.60:52207] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini
[Fri Jan 19 09:33:05.598524 2018] [authz_core:error] [pid 112689:tid 140636504160000] [client 158.69.116.60:52128] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini
[Fri Jan 19 02:05:41.426570 2018] [authz_core:error] [pid 73975:tid 140635949397760] [client 100.43.81.126:55018] AH01630: client denied by server configuration: /home2/bmstestn/public_html/php.ini

0 个答案:

没有答案