Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Anyone ever had this problem?


nyderrn

Recommended Posts

Warning: Failed to Receive in c:apachehtdocscatalogincludesclassesemail.php on line 502

 

Warning: Failed to Receive in c:apachehtdocscatalogincludesclassesemail.php on line 502

 

Warning: Cannot add header information - headers already sent by (output started at c:apachehtdocscatalogincludesclassesemail.php:502) in c:apachehtdocscatalogincludesfunctionsgeneral.php on line 29

 

 

/**

* Sends the mail.

*/



   function send($to_name, $to_addr, $from_name, $from_addr, $subject = 'Your order', $headers = '') {

     $to = (($to_name != '') ? '"' . $to_name . '" <' . $to_addr . '>' : $to_addr);

     $from = (($from_name != '') ? '"' . $from_name . '" <' . $from_addr . '>' : $from_addr);



     if (is_string($headers)) {

       $headers = explode($this->lf, trim($headers));

     }



     for ($i=0; $i<count($headers); $i++) {

       if (is_array($headers[$i])) {

         for ($j=0; $j<count($headers[$i]); $j++) {

           if ($headers[$i][$j] != '') {

             $xtra_headers[] = $headers[$i][$j];

           }

         }

       }



       if ($headers[$i] != '') {

         $xtra_headers[] = $headers[$i];

       }

     }



     if (!isset($xtra_headers)) {

       $xtra_headers = array();

     }



     if (EMAIL_TRANSPORT == 'smtp') {

       return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->

       lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->

       lf . implode($this->lf, $xtra_headers));

     } else {

       return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode

       ($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));

     }

   }

 

Is this a configuration issue? I have everything configured in the Admin area to the best of my knowleadge. Any help is much appreciated. Thanks

Link to comment
Share on other sites

Looks like a mail server issue to me... do you have one?... the 'headers already sent' error is also often due to whitespace... usually at the end of the first file in the error message.... there should be no whitespace after the closing tag ?> or before the opening tag...... it is good practice after editing a file to place your cursor after the last tag and hit the delete key to make sure there is no whitespace......

Link to comment
Share on other sites

Looks like you have it installed on your c:/ hard drive. Do you have an SMTP server installed also, and php.ini pointing to it ? If not, then you'll get the error.

 

It'll be fine when you upload the script to proper webspace.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...