Sheng Posted July 26, 2005 Share Posted July 26, 2005 I searched for the whole forums and didn't found any solutions for this.. The problem is, I can send email to anyone in the admin panel without any problem, but when a customer submit the register form, this error occur.. :( Warning: mail(): SMTP server response: 501 Syntax error in parameters or arguments in C:\website\shop\includes\classes\email.php on line 500 Warning: Cannot modify header information - headers already sent by (output started at C:\website\shop\includes\classes\email.php:500) in C:\website\shop\includes\functions\general.php on line 29 Anybody have ideas on how to fix it ? *Sorry for my bad english - Sheng Even I read thousands of posts everyday, I'm still a noob in computing.. Link to comment Share on other sites More sharing options...
soldier Posted August 4, 2005 Share Posted August 4, 2005 Go to line 959 on includes/functions/general.php and change the tep_mail function so it looks like this. function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; // Instantiate a new mail object $message = new email(array('X-Mailer: osCommerce Mailer')); // // Build the text version // $text = strip_tags($email_text); // if (EMAIL_USE_HTML == 'true') { // $message->add_html($email_text, $text); // } else { // $message->add_text($text); // } // Send message // $message->build_message(); // $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); $headers = "From: $from_email_address\r\n" . "Reply-To: $from_email_address\r\n" . "X-Mailer: osCommerce Mailer"; mail ($to_email_address, $email_subject, $email_text , $headers); } that should take care of the problem.. Link to comment Share on other sites More sharing options...
Guest Posted February 4, 2006 Share Posted February 4, 2006 Thanks worked like a charm :thumbsup: Link to comment Share on other sites More sharing options...
Guest Posted February 4, 2006 Share Posted February 4, 2006 Now I get this error when sending an email: Warning: mail(): SMTP server response: 501 Syntax error in parameters or arguments in C:\Accounts\gr8salec\wwwRoot\catalog\admin\includes\classes\email.php on line 500 Warning: Cannot modify header information - headers already sent by (output started at C:\Accounts\gr8salec\wwwRoot\catalog\admin\includes\classes\email.php:500) in C:\Accounts\gr8salec\wwwRoot\catalog\admin\includes\functions\general.php on line 18 any ideas???? :( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.