CI Email library
CI邮件发送类,配置如下-------------------------------------------------
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'smtp.163.com';
$config['smtp_user'] = 'username';
$config['smtp_pass'] = 'password';
$config['smtp_port'] = 25;
$config['smtp_timeout'] = 30;
$config['mailtype'] = 'html';
可以正常发送邮件,但是我$this->email->attach($attachment);添加了一个gif图片作为附件,发送就失败,查看日志:
fwrite() [<a href='function.fwrite'>function.fwrite</a>]: send of 8192 bytes failed with errno=32 Broken pipe /path_to_system/libraries/Email.php 1817
fwrite() [<a href='function.fwrite'>function.fwrite</a>]: send of 2 bytes failed with errno=32 Broken pipe /path_to_system/libraries/Email.php 1817
这是什么原因,如何解决? 这个貌似是函数fwrite的问题,你搜下就知道了 搜过了,是fwrite问题,但是不知道具体怎么解决 这个没人了解吗 220 163.com Anti-spam GT for Coremail System (163com)
hello: 250-mail
250-PIPELINING
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-coremail 1Uxr2xKj7kG0xkI17xGrU7I0s8FY2U3Uj8Cz28x1UUUUU7Ic2I0Y2UFHhonmUCa0xDrUUUUj
250-STARTTLS
250 8BITMIME
Failed to authenticate password. Error: 550 用户被锁定
from: 553 Requested action not taken: Local user only,smtp3,DdGowKArOgYR2wJOMqFhAA--.1521S2 1308810002
The following SMTP error was encountered: 553 Requested action not taken: Local user only,smtp3,DdGowKArOgYR2wJOMqFhAA--.1521S2 1308810002
to: 503 bad sequence of commands
The following SMTP error was encountered: 503 bad sequence of commands
data: 503 bad sequence of commands
The following SMTP error was encountered: 503 bad sequence of commands
502 Error: command not implemented
The following SMTP error was encountered: 502 Error: command not implemented
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
User-Agent: CodeIgniter
Date: Thu, 23 Jun 2011 14:18:33 +0800
To: 13436569382@139.com
From:
Return-Path:
Subject: =?utf-8?Q?Here_is_your_info_name?=
Reply-To: "luxz@snailcity.com.cn"
X-Sender: luxz@snailcity.com.cn
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <4e02dab93dc57@snailcity.com.cn>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Hi name Here is the info you requested.2011-06-23 14:18:33
为什么老是报错啊啊 550 用户被锁定
你换另外的邮箱来发 你是ssl链接的吗?
设置成这样既可。
$config['email']['smtp_host'] = 'ssl://secure.smtp.com';
页:
[1]