Raam Posted January 20, 2005 Posted January 20, 2005 I have two problems I am on shared Server Problem 1: Multiple 'r' and 'n' letters In e-Mail only. I am using E-Mail Options: 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 I am able to send e-mails to customers and also able to send extra e-mails but the problem is in the email where ever there is 'r' or 'n' it diaplays 'rn' together like Orndern Numbern: 3 Detailed Irnvoice: Date Ornderned: Tuesday 18 Jarnuarny, 2005 Sernd To: Storne Name Addrness Courntrny Phorne Yourn orndern will rnot ship urntil we rneceive paymernt. Problem 2: Send Email To Customers from Admin it gives me error: Fatal error: Call to undefined function: constant() in includes/classes/email.php on line 61 Can someone help me please or any link which has solution will also be of great help. I searched the forum but could only find other email problems and suggestions but not this one. Excuse me If i have requested in the wrong place.
241 Posted January 20, 2005 Posted January 20, 2005 My guess would be that you have edited a file for the emails using the online file manager and that this has caused backslashes to be removed from the code. It is a known issue with using the online file manger to edit files that backslashes are removed from the code, often resulting in a parse error. It is better to use an ftp program such as ws_ftp to download a file and edit offline then ftp upload to the server thus avoiding the removal of backslashes. The guess is derived from \r and \n are used to signify a carriage return or new line for emails. No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Raam Posted January 20, 2005 Author Posted January 20, 2005 Yes I agree with you. Which files should i compare and replace suggest me please. email.php in both classes or any other file.
Guest Posted January 20, 2005 Posted January 20, 2005 Upload a new email.php and edit it again from there. Using an FTP program this time and never touch the evil File Manager again.
Guest Posted January 20, 2005 Posted January 20, 2005 Upload a new email.php and edit it again from there.? Using an FTP program this time and never touch the evil File Manager again. <{POST_SNAPBACK}> I meant files in Catalog's languages folder like catalog/includes/languages/english/create_account.php etc. And in Admin's languages folder like catalog/admin/includes/languages/english/orders.php etc. NOT email.php. :-"
OceanRanch Posted January 20, 2005 Posted January 20, 2005 Ray, I'm betting that your original thought on email.php IS the problem. The following line of code after changing something in email,php with the evil File Manager would probably cause the "strange" replacement of r's with rn's. $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); Also, good to see 241/steve posting a few times again...... Tom
Guest Posted January 21, 2005 Posted January 21, 2005 Ray, I'm betting that your original thought on email.php IS the problem. The following line of code after changing something in email,php with the evil File Manager would probably cause the "strange" replacement of r's with rn's. $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); Also, good to see 241/steve posting a few times again...... Tom <{POST_SNAPBACK}> Sorry Tom, I meant to type in: Upload new copies of catalog/includes/languages/english/create_account.php and catalog/admin/includes/languages/english/orders.php etc. that email.php uses. I've already corrected my errors before your post above! :thumbsup:
Raam Posted January 21, 2005 Author Posted January 21, 2005 yes you are right anything you modify in email.php with oscommerce editor it messes this line $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text); which was modified to: $this->text = tep_convert_linefeeds(array("rn", "n", "r"), $this->lf, $text); and also if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "\r\n"; } else { $this->lf = "\n"; } which was mosified to: if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "rn"; } else { $this->lf = "n"; } I changed it back to original and uploaded using FTP. Bingo it works great. For New persons suggestion is always download the file using FTP and edit using any good editor, donot edit in browser and upload it back. keep a backup Just incase. Thx for your suggestions guyz.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.