【发布时间】:2012-11-21 13:46:38
【问题描述】:
在发送电子邮件时,我收到一堆这样的错误:
A PHP Error was encountered
Severity: Notice
Message: fwrite(): send of 12 bytes failed with errno=32 Broken pipe
Filename: libraries/Email.php
Line Number: 1846
A PHP Error was encountered
Severity: Notice
Message: fwrite(): send of 39 bytes failed with errno=32 Broken pipe
Filename: libraries/Email.php
Line Number: 1846
A PHP Error was encountered
Severity: Notice
Message: fwrite(): send of 31 bytes failed with errno=32 Broken pipe
Filename: libraries/Email.php
Line Number: 1846
我已按照 CodeIgniter 用户指南配置 SMTP:
$config['protocol']='smtp';
$config['smtp_host']='ssl0.ovh.net';
$config['smtp_port']='465';
$config['smtp_timeout']='10';
$config['smtp_user']='postmaster%example.com';
$config['smtp_pass']='password';
$config['mailtype'] = 'html';
$config['charset'] = 'utf-8';
$config['newline'] = "\r\n";
$config['useragent'] = 'Project';
配置文件似乎很好,并且正确(我检查了 OVH 的电子邮件配置文件)。
有什么解决办法吗?
【问题讨论】:
-
尝试将协议从
smtp更改为mail。我还没有检查,但谷歌告诉,它可能工作。 -
@EdwardRuchevits 它有效,但您确定它使用的是 OVH 邮件服务,而不是发送邮件或安装的后缀或类似的东西吗?我已经测试过了,即使我输入了错误的密码,它仍然会发送消息,所以它不起作用。
-
它使用标准发送邮件。至于你的问题,这个看起来很相似:stackoverflow.com/questions/1555145/…
-
是因为你的端口!单独使用 465 进行 SSL 连接!其余使用 25 作为端口!
-
我在这里回答了同样的问题:stackoverflow.com/questions/4338950/…
标签: codeigniter email smtp freebsd