Part of the EllisLab Network
   
 
Sending Email Problem failed with errno=32 Broken pipe
Posted: 31 December 2006 12:14 AM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  18
Joined  12-21-2006

Hi, I need some help with email sending problem with Libraries Email.php :

Error displayed in Browser:

A PHP Error was encountered
Severity
: Notice

Message
: fwrite() [function.fwrite]: send of 547 bytes failed with errno=32 Broken pipe

Filename
: libraries/Email.php

Line Number
: 1482

controller/contact.php

function index()
{
                parent
::Controller();
        
$this->load->helper(array('url','html','form','date'));
        
$this->load->library('email');
        
        
$this->email->clear();
        
$config['protocol'] = 'sendmail';
        
$config['charset'] = 'iso-8859-1';
        
$config['wordwrap'] = TRUE;

            
$this->email->initialize($config);

        
$this->email->from($this->input->post('email'), 'Techindo Solution Center');

            
                
                
$this->email->to('support@iklanriau.com');
                
$this->email->subject($this->input->post('nama').'My Contact Subject');
                
                                
$this->email->message($this->input->post('email_content'));
                
                
$this->email->send();
        

}

I have been confused arround with email sometimes send and sometimes show that error broken pipe.

Please help me anyone…

 Signature 

Techindo Fail Over Cluster PHP Web Hosting, high speed 3,2 Ghz 2Gb RAM on Dual Xeon Server

Profile
 
 
Posted: 31 December 2006 03:30 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  735
Joined  10-18-2006

I’m using that code and I am not having that problem… in fact is rare, ‘cause the protocol you are using is sendmail, and in line 1481 I have the fwrite, but it is a method only called for SMTP protocol… :S:S

 Signature 

Once in a while I remember I use Twitter

Profile
 
 
Posted: 31 December 2006 05:01 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  18
Joined  12-21-2006

I’ve fixed this problem.

It seems that the old variable of email config have been set and $this->email->clear() did not help anything.

I’ve deleted all:

$this->email->clear();
        
$config['protocol'] = 'sendmail';
        
$config['charset'] = 'iso-8859-1';
        
$config['wordwrap'] = TRUE;

            
$this->email->initialize($config);

And it works.

 Signature 

Techindo Fail Over Cluster PHP Web Hosting, high speed 3,2 Ghz 2Gb RAM on Dual Xeon Server

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66426 Total Logged-in Users: 34
Total Topics: 84790 Total Anonymous Users: 3
Total Replies: 455008 Total Guests: 241
Total Posts: 539798    
Members ( View Memberlist )
Newest Members:  llogocsaturkeytherendStudioGeorgiaJZeerfedegheEdgedcenticeRoger_Mxcamilo