Zen Cart Logo
Forums / General Questions / Extra line breaks in this message were removed

Extra line breaks in this message were removed

Locked

Views: 5,918

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
18 Jan 2008, 5:07 PM
#1
cablesimple avatar

cablesimple

New Zenner

Join Date:
May 2007
Posts:
99
Plugin Contributions:
0

Extra line breaks in this message were removed

Hi all, couple of issues here I'm wondering if anyone can help me with (they may be the same or similar issues). I believe one or both of these issue are something I missed when I created a custom shipping module, and/or modified the tax rate function.

Outlook is reporting that my text emails have extra line breaks in them and that it's removing them. When they are removed by Outlook the "Sales Tax" line butts up to the end of the Shipping line.
Here's an example:
Sub-Total: $24.99
Available shipping options (UPSR - ground service): $7.99 Sales Tax (8.75%): $2.19
Total: $35.17

So I though that it was because of my custom shipping module maybe not putting a break in where it was supposed to. So I tried the email with the "flat" module which worked (see below). However Outlook still reports "extra line breaks ... were removed".
Sub-Total: $49.99
Shipping Rate (Best Way): $5.00
Sales Tax (8.75%): $4.37
Total: $59.36

So question 1 is, where are the extra line breaks coming from? Question 2 is, where did I go wrong with my shipping module, why doesn't it have a line break before it starts, or where did I go wrong with my tax function (if that's the reason for the missing line break). This may not be possible without seeing the code, but figured I'd give it a try.

I am currently running 1.3.8a. I'm using SMTP with Exchange with CR/LF . I've tried LF too.

Thank you for any assistance!

18 Jan 2008, 8:23 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Extra line breaks in this message were removed

You have three options:

  1. Change your Outlook settings to not automatically remove so-called "extra" line breaks.

  2. Use HTML-formatted emails instead

  3. Rewrite the code so that the emails are sent with either 2 spaces at the start of each line or a tab at the end of each line, as discussed here:
    http://www.masternewmedia.org/newsletter_publishing/newsletter_formatting/remove_line_breaks_issue_Microsoft_Outlook_2003_when_publishing_text_newsletters_20051217.htm

21 Jan 2008, 2:12 PM
#3
cablesimple avatar

cablesimple

New Zenner

Join Date:
May 2007
Posts:
99
Plugin Contributions:
0

Re: Extra line breaks in this message were removed

Thanks very much DrByte. Too funny that the newsletter they are referencing is talking about a suburb right next to me (Tonawanda NY).

Somehow that information doesn't surprise me one bit.

As for the other issue, any idea what I'm missing to cause those two lines to run together? As I mentioned, when I use a different shipping module it doesn't do that. When I researched it a bit, I found that the newline was added in orders.php by reading from orders_total. There was no difference (that I could see) between my modules order_total record and flat.php's record. Any other hints you could provide to point me in the right direction?