Zen Cart Logo
Forums / General Questions / order emails double-spaced, how to fix??

order emails double-spaced, how to fix??

Locked

Views: 3,616

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
10 Jul 2006, 12:46 PM
#1
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

order emails double-spaced, how to fix??

I have a 1.2.x ZC shop, and recently our orders emails started coming in double-spaced where they used to be single-spaced.

Can someone please advise me where I should look to see why this is happening??

Thank you, Tom

10 Jul 2006, 3:56 PM
#2
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: order emails double-spaced, how to fix??

tlyczko:

I have a 1.2.x ZC shop, and recently our orders emails started coming in double-spaced where they used to be single-spaced.

Can someone please advise me where I should look to see why this is happening??

Thank you, Tom
What font size have you set up?

10 Jul 2006, 3:57 PM
#3
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Sorry, I forgot to say that it's TEXT email, not HTML email.
This didn't use to happen until early last week, then all our order emails started coming in double-spaced.
Thanks, Tom

10 Jul 2006, 4:10 PM
#4
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

[Edited] - Seem to be a hosting problem - according to the message below.

10 Jul 2006, 4:10 PM
#5
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: order emails double-spaced, how to fix??

Looks like some problem has started to happen with your email server lately
http://discussions.apple.com/message.jspa?messageID=2568712
Check with the host

10 Jul 2006, 4:11 PM
#6
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Message edited above superprg's message.

10 Jul 2006, 4:13 PM
#7
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

I will check with my hosting company after I try out the text changes suggested above.

This only started last week, before that everything was fine...

Thank you, Tom

10 Jul 2006, 4:16 PM
#8
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Hello, TheOracle,

Sorry for being dense, did you edit out your suggestion about removing the /n/n from the file??

Which file name was it?? I would like to check that file to make sure it is working correctly...

Thank you, Tom

10 Jul 2006, 4:20 PM
#9
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Before considering my modifications, I must say I have to agree with superprg's suggestion first. If your host denys the fact that some changes were actually made from their end, then - perhaps - I will consider it to PM the changes to you.

10 Jul 2006, 4:20 PM
#10
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: order emails double-spaced, how to fix??

In zen\includes\functions\functions_email.php


// Build the email based on whether customer has selected HTML or TEXT, and whether we have supplied HTML or TEXT-only components
if (!zen_not_null($email_text)) {
$text = str_replace('<br[[:space:]]/?[[:space:]]>', "@CRLF", $block['EMAIL_MESSAGE_HTML']);
$text = str_replace('</p>', '</p>@CRLF', $text);
$text = htmlspecialchars(stripslashes(strip_tags($text)));
} else {
$text = strip_tags($email_text);


Ver less probable that an extra /n would get added of a sudden in that code :)

10 Jul 2006, 4:24 PM
#11
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Hello TheOracle,

I don't mean to be rude, but I discovered that my email notification of that particular reply contains your code suggestions.

So I looked again at your code suggestions and observed that the order confirmations are indeed displaying double-spacing where the /n /n is showing in the orders.php file.

I know orders.php is a 'core' file and that one should not change ZC core files, though.

This cart runs on a Linux server btw so now I will check with tech support...

Thank you, Tom

10 Jul 2006, 4:25 PM
#12
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Very well, PMing you the changes . . .

10 Jul 2006, 4:28 PM
#13
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

@superprg:

These errors are not from the functions_email itself but specifically from the sent orders over email. Additional spaces are involved under includes/classes/order.php file.

Modifications has been sent to the requester. Results should be posted shortly. :wink2:

10 Jul 2006, 4:30 PM
#14
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Hello again TheOracle,

Thank you for PMing...For now I am checking with our hosting company and see what they say, explaining that the site's ZC setup uses sendmail and that it appears that /n /n is being interpreted as CRLF instead of LF...

We shall see what happens...

Thank you, Tom

10 Jul 2006, 4:53 PM
#15
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: order emails double-spaced, how to fix??

TheOracle:

@superprg:

These errors are not from the functions_email itself but specifically from the sent orders over email. Additional spaces are involved under includes/classes/order.php file.

Modifications has been sent to the requester. Results should be posted shortly. :wink2:
Thanks for the updates TheOracle

10 Jul 2006, 5:24 PM
#16
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

My hosting company says:

<quote> A: We stopped using sendmail as our mail processor on the web boxes because of some serious security and performance issues. We replaced it with a program called qmail which functions exactly the same.

Qmail is the program our mail servers use to send mail, which is where sendmail used to deliver all of the forms before we put qmail on each web box. However, this change happened almost 3 weeks ago, so I don't see how the two could be related.
</quote>

Also, when asked if Qmail treats \n any differently than sendmail, the reply was:

<quote> A: As far as I am aware and have experienced, qmail handles the \n value correctly. The only spot where you should be getting the double CRLF should be on the line with the two \n characters. </quote>

I wonder if I should change \n to \r???? But that's altering a core file...same as changing all the \n\n to \n, sigh...:schmoll:

Thanks, Tom

10 Jul 2006, 5:29 PM
#17
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

I wonder if I should change \n to \r???? But that's altering a core file...same as changing all the \n\n to \n, sigh...

Which is why, I edited my post earlier. Since your web hosting party replied with this confirmation message:

The only spot where you should be getting the double CRLF should be on the line with the two \n characters.

It means that you do NOT require these changes anymore, since your email configuration is actually set to CRLF. Unless you have an SMTP server address from your host, I no longer see a point to modify that core file, since it is already properly handled from Zen-Cart. :wink2:

10 Jul 2006, 5:29 PM
#18
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

I looked it up and verified for myself that \n is the correct item to use.
But it's still being interpreted as double-spaced, sigh.
\r would probably not work.
Thank you, Tom

10 Jul 2006, 5:39 PM
#19
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

Hello TheOracle,

I understand your correct responses etc., but that does not tell me why our order confirmation etc. emails are coming through as double-spaced...:schmoll:

I haven't changed anything in the site's ZC configuration either.

Thank you, Tom

10 Jul 2006, 6:21 PM
#20
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: order emails double-spaced, how to fix??

that does not tell me why our order confirmation etc. emails are coming through as double-spaced...

Your host said so. It is since modifications from the server-end was made due to email software changes - since the past three weeks. However, there's nothing that prevents you to tryout my modifications. It will not cause any damages to try them anyway. Simply follow my instructions I sent you from PM and try them out.

Note: Once the confirmation email is being sent, make sure not to simply forward the email to you again, in order to receive it, since it will NOT work. You must resend the confirmation email 'from your admin section' - period.