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

<small id='7lau5'></small><noframes id='7lau5'>

        <bdo id='7lau5'></bdo><ul id='7lau5'></ul>
      1. <legend id='7lau5'><style id='7lau5'><dir id='7lau5'><q id='7lau5'></q></dir></style></legend>
      2. 如何在 xampp 上使用 phpmailer 发送邮件

        how to send mail using phpmailer on xampp(如何在 xampp 上使用 phpmailer 发送邮件)

            <tbody id='1nkoy'></tbody>
            • <bdo id='1nkoy'></bdo><ul id='1nkoy'></ul>
              <tfoot id='1nkoy'></tfoot>
            • <small id='1nkoy'></small><noframes id='1nkoy'>

                <legend id='1nkoy'><style id='1nkoy'><dir id='1nkoy'><q id='1nkoy'></q></dir></style></legend>
                  <i id='1nkoy'><tr id='1nkoy'><dt id='1nkoy'><q id='1nkoy'><span id='1nkoy'><b id='1nkoy'><form id='1nkoy'><ins id='1nkoy'></ins><ul id='1nkoy'></ul><sub id='1nkoy'></sub></form><legend id='1nkoy'></legend><bdo id='1nkoy'><pre id='1nkoy'><center id='1nkoy'></center></pre></bdo></b><th id='1nkoy'></th></span></q></dt></tr></i><div id='1nkoy'><tfoot id='1nkoy'></tfoot><dl id='1nkoy'><fieldset id='1nkoy'></fieldset></dl></div>
                  本文介绍了如何在 xampp 上使用 phpmailer 发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我一直在尝试使用 xampp 上的 php mailer 发送邮件,但我确实收到此错误消息无法发送消息.邮件程序错误:以下发件人地址失败:xxxx2@gmail.com:在未连接的情况下调用 Mail()

                  I have been trying to send a mail using php mailer on xampp and i do get this error saying Message could not be sent. Mailer Error: The following From address failed: xxxx2@gmail.com : Called Mail() without being connected

                  拜托,我需要有关如何解决此问题的帮助.这是我的代码;

                  please, i need help on how to fix this. Here is my code;

                  <?php
                  require( 'class.phpmailer.php' );
                  
                    $mail = new PHPMailer;
                    $mail->IsSMTP();
                    $mail->SMTPAuth = true;
                    $mail->Host = "tls://smtp.gmail.com";
                    $mail->Port = 25;
                    $mail->Username = "xxxx@gmail.com";
                    $mail->Password = "xxxxx";
                    //Sending the actual email
                    $mail->setFrom('xxxx2@gmail.com', 'Aaron');
                    $mail->addAddress('xxxx2@gmail.com', 'Aaron');     // Add a recipient
                    $mail->isHTML(false);                                  // Set email format to HTML
                    $mail->Subject = 'Calculation form results from ';
                    $mail->Body = 'testing...';
                  
                    if(!$mail->send()) {
                      echo 'Message could not be sent. ';
                      echo 'Mailer Error: ' . $mail->ErrorInfo;
                      exit;
                    }
                  ?>
                  

                  推荐答案

                  从 https://github.com/PHPMailer/PHPMailer/blob/master/examples/gmail.phps

                  //Create a new PHPMailer instance
                  $mail = new PHPMailer;
                  
                  //Tell PHPMailer to use SMTP
                  $mail->isSMTP();
                  
                  //Set the hostname of the mail server
                  $mail->Host = 'smtp.gmail.com';
                  // use
                  // $mail->Host = gethostbyname('smtp.gmail.com');
                  // if your network does not support SMTP over IPv6
                  
                  //Set the SMTP port number - 587 for authenticated TLS
                  $mail->Port = 587;
                  
                  //Set the encryption system to use - ssl (deprecated) or tls
                  $mail->SMTPSecure = 'tls';
                  
                  //Whether to use SMTP authentication
                  $mail->SMTPAuth = true;
                  
                  //Username to use for SMTP authentication - use full email address for gmail
                  $mail->Username = "username@gmail.com";
                  
                  //Password to use for SMTP authentication
                  $mail->Password = "yourpassword";
                  
                  //Set who the message is to be sent from
                  $mail->setFrom('from@example.com', 'First Last');
                  
                  //Set an alternative reply-to address
                  $mail->addReplyTo('replyto@example.com', 'First Last');
                  
                  //Set who the message is to be sent to
                  $mail->addAddress('whoto@example.com', 'John Doe');
                  

                  这篇关于如何在 xampp 上使用 phpmailer 发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

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

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

                          <tbody id='vWV3g'></tbody>