email的smtp老是发不出去???
$this->load->library('email');
$mail_to = trim($this->input->post('mail_to'));
$config['protocol'] = 'smtp';//trim($this->input->post('protocol'));
$config['smtp_host'] = trim($this->input->post('smtp_host'));
$config['smtp_user'] = trim($this->input->post('smtp_user'));
$config['smtp_pass'] = trim($this->input->post('smtp_pass'));
$config['smtp_port'] = trim($this->input->post('smtp_port'));
$config['charset'] = 'utf-8';//'iso-8859-1';
$config["validate"] = true;
$config["priority"] = 1;
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
$this->email->initialize($config);
$this->email->from($config['smtp_user'], 'Payne');
$this->email->to($mail_to);
$this->email->subject('测试邮件。');
$this->email->message('这是一封测试邮件。');
$this->email->send();
echo $this->email->print_debugger();exit;
Invalid email address: <br />220 smtp.qq.com Esmtp QQ Mail Server
<br /><pre>hello: 250-smtp.qq.com
250-PIPELINING
250-SIZE 52428800
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN
250-MAILCOMPRESS
250 8BITMIME
</pre><pre>from: 250 Ok
</pre><pre>to: 501 Bad address syntax
</pre>The following SMTP error was encountered: 501 Bad address syntax
<br /><pre>data: 503 Error: need RCPT command
</pre>The following SMTP error was encountered: 503 Error: need RCPT command
<br />501 Error: malformed authentication response
<br />The following SMTP error was encountered: 501 Error: malformed authentication response
<br />Unable to send email using PHP SMTP.Your server might not be configured to send mail using this method.<br /><pre>User-Agent: CodeIgniter
Date: Fri, 13 Sep 2013 11:30:23 +0800
From: "Payne" <342741692@qq.com>
Return-Path: <342741692@qq.com>
Subject: =?utf-8?Q?=e4=bc=98=e7=9b=9f=e6=95=99=e8=82=b2=e6=b5=8b=e8=af=95=e9=82
?=
=?utf-8?Q?=ae=e4=bb=b6=e3=80=82?=
Reply-To: "342741692@qq.com" <342741692@qq.com>
X-Sender: 342741692@qq.com
X-Mailer: CodeIgniter
X-Priority: 1 (Highest)
Message-ID: <523286cfe10a5@qq.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
这是一封测试邮件。
</pre>
邮箱的帐号密码smtp都没得问题
urlencode 和 urldecode 大概这样 你可以试试 IvanCI 发表于 2013-9-13 12:36 static/image/common/back.gif
urlencode 和 urldecode 大概这样 你可以试试
你指是 邮箱地址吗 ?
我urldecode试过了 ,直接填写邮箱地址不用post也试过了 一样的错误
IvanCI 发表于 2013-9-13 12:36 static/image/common/back.gif
urlencode 和 urldecode 大概这样 你可以试试
Failed to authenticate username. 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
pxc2471418 发表于 2013-9-13 13:46 static/image/common/back.gif
你指是 邮箱地址吗 ?
我urldecode试过了 ,直接填写邮箱地址不用post也试过了 一样的错误
Failed to authenticate username. 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
但是帐号密码都是对的
已经解决 谢谢了 pxc2471418 发表于 2013-9-13 14:22 static/image/common/back.gif
已经解决 谢谢了
怎么解决的,我也遇到这个问题了
怎么找到的,我的还是不行。
页:
[1]