用户
 找回密码
 入住 CI 中国社区
搜索
查看: 7793|回复: 6
收起左侧

[HELP] CI Email library

[复制链接]
发表于 2011-2-21 10:42:42 | 显示全部楼层 |阅读模式
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

这是什么原因,如何解决?
发表于 2011-2-21 16:36:18 | 显示全部楼层
这个貌似是函数fwrite的问题,你搜下就知道了
 楼主| 发表于 2011-2-22 09:26:40 | 显示全部楼层
搜过了,是fwrite问题,但是不知道具体怎么解决
 楼主| 发表于 2011-2-23 15:05:09 | 显示全部楼层
这个没人了解吗
发表于 2011-6-23 14:31:39 | 显示全部楼层
220 163.com Anti-spam GT for Coremail System (163com[20101010])

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

为什么老是报错啊啊
发表于 2011-6-23 17:08:09 | 显示全部楼层
550 用户被锁定

你换另外的邮箱来发
发表于 2015-10-9 17:42:55 | 显示全部楼层
你是ssl链接的吗?

设置成这样既可。

PHP复制代码
$config['email']['smtp_host'] = 'ssl://secure.smtp.com';
复制代码

本版积分规则