Codeigniter SMTP Email Error(Codeigniter SMTP 电子邮件错误)
本文介绍了Codeigniter SMTP 电子邮件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的 codeigniter 应用程序中使用 SMTP 时,我无法发送电子邮件.
I can't get my emails to send when using SMTP with my codeigniter app.
关于 SO 有很多类似的问题,但没有一个能解决我的问题,所以我再次问.
There are many similar questions on SO, but none that solve my problem so that's why I'm asking again.
这是我得到的错误:
hello:
The following SMTP error was encountered:
Failed to send AUTH LOGIN command. Error:
from:
The following SMTP error was encountered:
to:
The following SMTP error was encountered:
data:
The following SMTP error was encountered:
The following SMTP error was encountered:
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter
Date: Tue, 22 Apr 2014 22:54:12 -0400
From:
Return-Path:
To: myemail@gmail.com
Subject: =?utf-8?Q?Request_from_C&J_Builders_Contact_form?=
Reply-To: "donotreply@C&JBuilders.us"
X-Sender: donotreply@C&JBuilders.us
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <53572b54551be@C&JBuilders.us>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: jeff
Email: jeff@gmail.com
Phone: 555555555
Message: asdfs fds
Here's my config/email.php:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
$config['useragent'] = "CodeIgniter";
$config['protocol'] = "smtp";
$config['_smtp_auth'] = TRUE;
$config['smtp_host'] = "smtp.zoho.com";
$config['smtp_user'] = "donotreply@cjbuilders.info";
$config['smtp_pass'] = "mypassword";
$config['smtp_port'] = 465;
$config['wordwrap'] = TRUE;
$config['wrapchars'] = 76;
$config['mailtype'] = "text";
$config['charset'] = "utf-8";
$config['validate'] = FALSE;
$config['priority'] = 3;
$config['crlf'] = "
";
$config['newline'] = "
";
$config['bcc_batch_mode'] = TRUE;
$config['bcc_batch_size'] = "200";
?>
这是我发送电子邮件的控制器片段:
Here's my controller snippet that sends the email:
// sends the email to
$this->email->from('donotreply@C&JBuilders.us');
$this->email->to('myemail@gmail.com');
$this->email->subject('Request from C&J Builders Contact form');
$this->email->message('From: '.$this->input->post('name')."
".
'Email: '.$this->input->post('email')."
".
'Phone: '.$this->input->post('phone')."
".
'Message: '.$this->input->post('message')."
");
$this->email->send();
echo $this->email->print_debugger();
推荐答案
对于 SSL 将 ssl://
添加到您的 SMTP 主机地址
For SSL add ssl://
to Your SMTP host address
$config['smtp_host'] = "ssl://smtp.zoho.com";
这篇关于Codeigniter SMTP 电子邮件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:Codeigniter SMTP 电子邮件错误
基础教程推荐
猜你喜欢
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在多维数组中查找最大值 2021-01-01