<bdo id='L6Tsm'></bdo><ul id='L6Tsm'></ul>

      1. <tfoot id='L6Tsm'></tfoot>
        <legend id='L6Tsm'><style id='L6Tsm'><dir id='L6Tsm'><q id='L6Tsm'></q></dir></style></legend>

        <small id='L6Tsm'></small><noframes id='L6Tsm'>

        <i id='L6Tsm'><tr id='L6Tsm'><dt id='L6Tsm'><q id='L6Tsm'><span id='L6Tsm'><b id='L6Tsm'><form id='L6Tsm'><ins id='L6Tsm'></ins><ul id='L6Tsm'></ul><sub id='L6Tsm'></sub></form><legend id='L6Tsm'></legend><bdo id='L6Tsm'><pre id='L6Tsm'><center id='L6Tsm'></center></pre></bdo></b><th id='L6Tsm'></th></span></q></dt></tr></i><div id='L6Tsm'><tfoot id='L6Tsm'></tfoot><dl id='L6Tsm'><fieldset id='L6Tsm'></fieldset></dl></div>

        PHPMailer 中的 SMTP 连接()失败错误

        时间:2024-08-23
              <tfoot id='WZI3p'></tfoot>

                <small id='WZI3p'></small><noframes id='WZI3p'>

                  <tbody id='WZI3p'></tbody>
                  <bdo id='WZI3p'></bdo><ul id='WZI3p'></ul>
                  <i id='WZI3p'><tr id='WZI3p'><dt id='WZI3p'><q id='WZI3p'><span id='WZI3p'><b id='WZI3p'><form id='WZI3p'><ins id='WZI3p'></ins><ul id='WZI3p'></ul><sub id='WZI3p'></sub></form><legend id='WZI3p'></legend><bdo id='WZI3p'><pre id='WZI3p'><center id='WZI3p'></center></pre></bdo></b><th id='WZI3p'></th></span></q></dt></tr></i><div id='WZI3p'><tfoot id='WZI3p'></tfoot><dl id='WZI3p'><fieldset id='WZI3p'></fieldset></dl></div>

                • <legend id='WZI3p'><style id='WZI3p'><dir id='WZI3p'><q id='WZI3p'></q></dir></style></legend>
                • 本文介绍了PHPMailer 中的 SMTP 连接()失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我对 PHP 完全陌生,我想使用 PHP 发送邮件.我有一个联系我们表格,该表格将接受与我联系的人的电子邮件,因此邮件将发送给我.我正在使用来自 https://github.com/PHPMailer/PHPMailer/tree/master 以下是我正在使用的代码片段.

                  I am completely new to PHP and I want to send a mail using PHP. I have a Contact Us form whcih will accept email is of the person contacting me and therefore the mail will be sent to me. I am using PHPMailer library from https://github.com/PHPMailer/PHPMailer/tree/master and following is the code snippet I am using.

                  <?php
                  require("class.phpmailer.php");
                  $mail = new PHPMailer();
                  $mail->IsSMTP();  
                  
                  $mail->SMTPSecure = 'tls';
                  
                  $mail->Host     = "resolver1.opendns.com"; // this SMTP server of my machine
                  //$mail->Host     = "208.67.222.222";//ip ; which one to use the resolver1.opendns.com or 208.67.222.222 ???
                  
                  $mail->From     = "xyz@gamil.com;//email id of the person 
                  
                  $mail->AddAddress("datta.dhonde@coreathena.com");//my email id
                  
                  $mail->Subject  = "First PHPMailer Message";
                  $mail->Body     = "Hi! 
                  
                   This is my first e-mail sent through PHPMailer.";
                  $mail->WordWrap = 50;
                  
                  if(!$mail->Send()) 
                  {
                    echo 'Message was not sent.';
                    echo 'Mailer error: ' . $mail->ErrorInfo;
                  }  
                  else 
                  {
                    echo 'Message has been sent.';
                  }
                  ?> 
                  

                  我收到错误消息未发送.邮件程序错误:SMTP 连接()失败."我没有得到什么问题..?$邮件->主机=";请评论这代表什么?

                  I am getting the error " Message was not sent.Mailer error: SMTP connect() failed." I am not getting what is the problem..? $mail->Host = ""; please comment on what this stands for??

                  推荐答案

                  添加 $mail->SMTPDebug = 1; 并尝试调试问题.

                  Add $mail->SMTPDebug = 1; and try to debug the problem.

                  这篇关于PHPMailer 中的 SMTP 连接()失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何向 PHP 指定应该使用外部邮件服务器发送 mail()? 下一篇:PHPMailer,SMTP 连接()失败错误与 Gmail

                  相关文章

                • <i id='cqxnb'><tr id='cqxnb'><dt id='cqxnb'><q id='cqxnb'><span id='cqxnb'><b id='cqxnb'><form id='cqxnb'><ins id='cqxnb'></ins><ul id='cqxnb'></ul><sub id='cqxnb'></sub></form><legend id='cqxnb'></legend><bdo id='cqxnb'><pre id='cqxnb'><center id='cqxnb'></center></pre></bdo></b><th id='cqxnb'></th></span></q></dt></tr></i><div id='cqxnb'><tfoot id='cqxnb'></tfoot><dl id='cqxnb'><fieldset id='cqxnb'></fieldset></dl></div>

                    <small id='cqxnb'></small><noframes id='cqxnb'>

                      • <bdo id='cqxnb'></bdo><ul id='cqxnb'></ul>

                      <tfoot id='cqxnb'></tfoot>

                    1. <legend id='cqxnb'><style id='cqxnb'><dir id='cqxnb'><q id='cqxnb'></q></dir></style></legend>