Guest Posted March 3, 2007 Posted March 3, 2007 Hi, Customers receive the following error after submitting an order. Mail seems to be configured properly as I am able to email customers from the admin/order page. I also receive an email copy of the order when its submitted. Upon testing, it doesn't seem to matter if they purchase through paypal or check/money order... they still get this error message. My system admin indicated it could be a problem between mySQL4 and mySQL5, which apparently they upgraded to a few weeks ago (unfortunately, I haven't had an order in a few weeks, so I am uncertain it is related) and have been unable to find any forum posts addressing this issue. Thanks for your time and consideration in assisting me with this issue! Page Name: https://simplyleatherwear.com/catalog/checkout_process.php Error: Warning: mail() [function.mail]: SMTP server response: 555 syntax error (#5.5.4) in C:\hshome\...\simplyleatherwear.com\catalog\includes\classes\email.php on line 520 Warning: Cannot modify header information - headers already sent by (output started at C:\hshome\...\simplyleatherwear.com\catalog\includes\classes\email.php:520) in C:\hshome\...\simplyleatherwear.com\catalog\includes\functions\general.php on line 47
Guest Posted March 3, 2007 Posted March 3, 2007 do you have windows server ? this problem is oversley the mail whats on like 520 in email.php ?
Guest Posted March 3, 2007 Posted March 3, 2007 Sorry not to include that information initially. Yes, Windows 2003 Server, IIS 6.0. My configuration email options are: E-Mail Transport Method: smtp E-Mail Linefeeds: CRLF Use MIME HTML When Sending Emails: false Verify E-Mail Addresses Through DNS: false Send E-Mails: true line 520 is: 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)); email.php line 520 is in "function send(...)" which starts at line 473. /** * Sends the mail. */ function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') { if ((strstr($to_name, "\n") != false) || (strstr($to_name, "\r") != false)) { return false; } if ((strstr($to_addr, "\n") != false) || (strstr($to_addr, "\r") != false)) { return false; } if ((strstr($subject, "\n") != false) || (strstr($subject, "\r") != false)) { return false; } if ((strstr($from_name, "\n") != false) || (strstr($from_name, "\r") != false)) { return false; } if ((strstr($from_addr, "\n") != false) || (strstr($from_addr, "\r") != false)) { return false; } $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)); } }
Guest Posted March 4, 2007 Posted March 4, 2007 Try commenting out the if ($headers[$i] != '') { $xtra_headers[] = $headers[$i]; } } It is duplicating the header on your box. Sorry not to include that information initially. Yes, Windows 2003 Server, IIS 6.0. My configuration email options are: E-Mail Transport Method: smtp E-Mail Linefeeds: CRLF Use MIME HTML When Sending Emails: false Verify E-Mail Addresses Through DNS: false Send E-Mails: true line 520 is: 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)); email.php line 520 is in "function send(...)" which starts at line 473. /** * Sends the mail. */ function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') { if ((strstr($to_name, "\n") != false) || (strstr($to_name, "\r") != false)) { return false; } if ((strstr($to_addr, "\n") != false) || (strstr($to_addr, "\r") != false)) { return false; } if ((strstr($subject, "\n") != false) || (strstr($subject, "\r") != false)) { return false; } if ((strstr($from_name, "\n") != false) || (strstr($from_name, "\r") != false)) { return false; } if ((strstr($from_addr, "\n") != false) || (strstr($from_addr, "\r") != false)) { return false; } $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)); } }
Guest Posted March 4, 2007 Posted March 4, 2007 Thanks for your suggestion Kevin. I remarked out that section and submitted another test order. The error was exactly the same. The email I received (as customer) also appeared to be the same as from previous tests. Any other suggestions would be very much appreciated! Regards, Justin
Guest Posted March 4, 2007 Posted March 4, 2007 Please post your line that is giving the error in the general.php file I think the problem is there. Thanks for your suggestion Kevin. I remarked out that section and submitted another test order. The error was exactly the same. The email I received (as customer) also appeared to be the same as from previous tests. Any other suggestions would be very much appreciated! Regards, Justin
Guest Posted March 4, 2007 Posted March 4, 2007 After some additional research, I discovered that in the admin > my store configuration, I set up "Send Extra Order Emails To" so I would get notification of each order. I was not getting that notification. So, I removed my email address and re-tested it... IT WORKED! On line 264 of /catalog/checkout_process.php: if (SEND_EXTRA_ORDER_EMAILS_TO != '') { tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } I'm guessing that the problem originates here, but only shows itself within email.php. If anyone has seen this specific error previously, suggestions how to fix it will be appreciated! I have spent way too many hours trying to resolve this issue and am happy customers will not get an error. Unless a fix presents itself, I'll have to back-burner this issue until I have more time. Thanks to all who have viewed this issue, as well as those that have made comments and suggestions! Regards, Justin
Guest Posted March 4, 2007 Posted March 4, 2007 To provide even more information in case someone else is experiencing this same problem... I went back into the admin > my store configuration > "Send Extra Order Emails To" and submitted only my email address. Previously, based on the example it provides in the edit box, I had used: Justin Alderson <[email protected]> Perhaps it was because I used both first and last name. Anyway, a test order worked fine when I only had my email address in the area. Thanks again! Justin
Recommended Posts
Archived
This topic is now archived and is closed to further replies.