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

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

      <legend id='uZi2k'><style id='uZi2k'><dir id='uZi2k'><q id='uZi2k'></q></dir></style></legend>
        • <bdo id='uZi2k'></bdo><ul id='uZi2k'></ul>
        <tfoot id='uZi2k'></tfoot>
      1. mediatemple - 无法使用 codeigniter 发送电子邮件

        mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)

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

                • <bdo id='D4Yt9'></bdo><ul id='D4Yt9'></ul>
                  本文介绍了mediatemple - 无法使用 codeigniter 发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我无法在 codeigniter 中使用 mediatemple 发送电子邮件.我检查了电子邮件密码和 smtp 主机,它们是正确的.

                  I can't send emails using mediatemple in codeigniter.I've checked the email password and smtp host and they are correct.

                  这是错误:

                  Severity: Notice
                  
                  Message: fwrite() [function.fwrite]: send of 12 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.
                  
                  Filename: libraries/Email.php
                  
                  Line Number: 1846
                  

                  这是我的代码:我已将 sxxxxx.gridserver.com 替换为正确的 smtp.

                  This is my code: I have replaced sxxxxx.gridserver.com with my correct smtp.

                  function _sendEmail($from,$fromname,$to,$subject,$message){
                              $config = array(
                              'protocol' => 'smtp',
                              'smtp_host' => 'sxxxxx.gridserver.com',
                              'smtp_port' => 465,
                              'smtp_user' => 'noreply@mywebsite.com',
                              'smtp_pass' => 'mypass'
                          );
                  
                  
                          $this->load->library('email',$config);
                          $this->email->set_newline("
                  ");
                  
                          $this->email->from($from,$fromname);
                          $this->email->to($to);
                          $this->email->subject($subject);
                          $this->email->message($message);
                          $this->email->send();
                      }
                  

                  任何帮助将不胜感激.

                  我已经使用端口 25 解决了这个问题.

                  推荐答案

                  你需要初始化配置,见 电子邮件类的 codeigniter 文档.

                  You need to initialise the the config, see the codeigniter documentation for the email class.

                  这是我的例子,效果很好......

                  Here is my example which works well...

                      function send_email($attributes) {
                  
                          $this->load->library('email');
                  
                          $this->email->set_newline("
                  ");
                  
                          $config['protocol'] = 'smtp';
                          $config['smtp_host'] = 'host';
                          $config['smtp_port'] = '465';
                          $config['smtp_user'] = 'user@smtp.com';
                          $config['smtp_from_name'] = 'FROM NAME';
                          $config['smtp_pass'] = 'XXX';
                          $config['wordwrap'] = TRUE;
                          $config['newline'] = "
                  ";
                          $config['mailtype'] = 'html';                       
                  
                          $this->email->initialize($config);
                  
                          $this->email->from($config['smtp_user'], $config['smtp_from_name']);
                          $this->email->to($attributes['to']);
                          $this->email->cc($attributes['cc']);
                          $this->email->bcc($attributes['cc']);
                          $this->email->subject($attributes['subject']);
                  
                          $this->email->message($attributes['message']);
                  
                          if($this->email->send()) {
                              return true;        
                          } else {
                              return false;
                          }       
                  
                  }
                  

                  这篇关于mediatemple - 无法使用 codeigniter 发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  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 的问题)
                  smtp gmail server php mailer not working(smtp gmail服务器php邮件程序不工作)
                  Email goes in spam when I send it via others SMTP server(当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件)

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

                      <small id='0eqgQ'></small><noframes id='0eqgQ'>

                    1. <legend id='0eqgQ'><style id='0eqgQ'><dir id='0eqgQ'><q id='0eqgQ'></q></dir></style></legend>
                          <tbody id='0eqgQ'></tbody>
                          <bdo id='0eqgQ'></bdo><ul id='0eqgQ'></ul>