Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Emails are garbled


Carbon

Recommended Posts

Hi,

 

I haven't changed any settings or altered any files that deal with sending emails but suddenly all emails are being sent with a garbled message body (headers etc are ok).

 

I first noticed this when I did a test puchase using osCommerce and both the email sent to the customer and to myself confirming the order was garbled.

 

Then I sent an email to myself using the phpBB2 forum and the same thing.

 

This had lead me to believe that the problem may lie with the sendmail function of PHP.

 

Email auto-responders from my site still work and sending regular email through my smtp server on my site works.

 

here is a test email...

 

Return-Path: <[email protected]>
Received: from aamta02-winn.ispmail.ntl.com ([81.103.221.35])
         by mta05-winn.ispmail.ntl.com with ESMTP
         id <20050910121336.PVBR12537.mta05-winn.ispmail.ntl.com@aamta02-winn.ispmail.ntl.com>
         for <[email protected]>; Sat, 10 Sep 2005 13:13:36 +0100
Received: from mailforward.freeparking.com ([72.1.201.141])
         by aamta02-winn.ispmail.ntl.com with ESMTP
         id <20050910121335.UDNO14541.aamta02-winn.ispmail.ntl.com@mailforward.freeparking.com>
         for <[email protected]>; Sat, 10 Sep 2005 13:13:35 +0100
Received: from [67.15.32.16] (helo=spartan.xssl.net)
by mailforward.freeparking.com with esmtp (Exim 4.51 #4 (Debian))
id 1EE4Ed-0003cO-TL
for <[email protected]>; Sat, 10 Sep 2005 08:13:32 -0400
X-ClientAddr: 127.0.0.1
Received: from microbuild.com (localhost.localdomain [127.0.0.1])
by spartan.xssl.net (8.12.11/8.12.11) with ESMTP id j8ACDNPl009094
for <[email protected]>; Sat, 10 Sep 2005 13:13:23 +0100
Received: (from abailey0705@localhost)
by microbuild.com (8.12.11/8.12.11/Submit) id j8ACDNKd009092;
Sat, 10 Sep 2005 13:13:23 +0100
Date: Sat, 10 Sep 2005 13:13:23 +0100
Message-Id: <[email protected]>
To: "Fred Bloggs" <[email protected]>
Subject: Order Process
From: "Microbuild" <[email protected]>
MIME-Version: 1.0
X-Mailer: osCommerce Mailer
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: BASE64
X-xssl.net-MailScanner-Information: Please contact the ISP for more information
X-xssl.net-MailScanner: Found to be clean
X-MailScanner-From: [email protected]

TWljcm9idWlsZAotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0KT3JkZXIgTnVtYmVyOiA4CkRldGFpbGVkIEludm9pY2U6IGh0dHBzOi8vd3d3Lm1p
Y3JvYnVpbGQuY29tL21pY3JvYnVpbGQvY2F0YWxvZy9hY2NvdW50X2hpc3RvcnlfaW5mby5waHA/
b3JkZXJfaWQ9OApEYXRlIE9yZGVyZWQ6IFNhdHVyZGF5IDEwIFNlcHRlbWJlciwgMjAwNQoKdGVz
dCBwdXJjaGFzZQoKUHJvZHVjdHMKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tCjEgeCBFbGl0ZSBTeXN0ZW0gKEJsYWNrKSA9IMKjNjk5Ci0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpTdWItVG90
YWw6IMKjNjk5CkZsYXQgUmF0ZSAoQmVzdCBXYXkpOiDCozAKVkFUOiDCozEwNApUb3RhbDogwqM2
OTkKCkRlbGl2ZXJ5IEFkZHJlc3MKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tCkFjbWUgSW5jCkZyZWQgQmxvZ2dzCjEgV2F5IFN0cmVldApVcHRv
d24KTWV0cm9wb2xpcywgU08xMTJQWApIYW1wc2hpcmUsIFVuaXRlZCBLaW5nZG9tCgpCaWxsaW5n
IEFkZHJlc3MKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tCkFjbWUgSW5jCkZyZWQgQmxvZ2dzCjEgV2F5IFN0cmVldApVcHRvd24KTWV0cm9wb2xp
cywgU08xMTJQWApIYW1wc2hpcmUsIFVuaXRlZCBLaW5nZG9tCgpQYXltZW50IE1ldGhvZAotLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KQ2FzaCBv
biBEZWxpdmVyeQoKCg==

 

The very last lines are the garbled default email received by the customer after a test purchase.

 

Any help would be greatly appreciated.

 

Cheers

 

Carbon

Link to comment
Share on other sites

email options on the admin panel (like transport method) are all matching your host's settings?

 

yep... the "overiding" fact is that it all worked the day before. I spent the day doing some cosmetic work (nothing to do with email) then BAM!.. plus don't forget this also has affected my phpBB2 forum which has been running for a month.

 

The common denominator is SENDMAIL

 

any ideas?

 

Carbon

Link to comment
Share on other sites

There is GOOD NEWS ... (about time!) I registered on my forum (phpBB2) and made a test purchase (OSC) using my hotmail account and all confirmation emails came through ok... now these where viewed using the hotmail.com website... is it possible that somehow my outlook email settings got changed to some setting that I can't find (and believe me I've looked... even though I haven't changed a setting in years)?

 

Carbon

 

I'll re-test with my normal email

 

-----

 

re-tested.. still not legible in outlook

Link to comment
Share on other sites

Picked up my mail from my ISP website rather than letting outlook download them, and BAD NEWS... they are scrambled too. At least I can rule out my computer and outlook.

 

Again everything points to SENDMAIL but my host tells me that sendmail is a server wide function and would therefore affect all sites on my server. Is this true?

 

I'm no expert, and I'm new to all this server stuff but common sense tells me that something has changed their end that is affecting the way email body text is being encoded for any applications that uses sendmail.

 

All other email (smtp, responders and aliases) work fine.

 

I hope someone comes up with an answer soon as I can't continue development until this is resolved

 

Cheers

 

Carbon

Link to comment
Share on other sites

For testing purposes I switched osc to use html email in the admin/configuration/email section.

 

The first test email came through like this...

 

--=_af740aeca8635444b33d9ef5a7c57d63
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Microbuild
------------------------------------------------------
Order Number: 13
Detailed Invoice: https://www.microbuild.com/microbuild/catalog/account_history_info.php?order_id=13
Date Ordered: Sunday 11 September, 2005

test purchase using html email

Products
------------------------------------------------------
1 x Elite System (Silver) = ?699
------------------------------------------------------
Sub-Total: ?699
Flat Rate (Best Way): ?0
VAT: ?104
Total: ?699

Delivery Address
------------------------------------------------------
Acme Inc
Fred Bloggs
1 Way Street
Uptown
Metropolis, SO112PX
Hampshire, United Kingdom

Billing Address
------------------------------------------------------
Acme Inc
Fred Bloggs
1 Way Street
Uptown
Metropolis, SO112PX
Hampshire, United Kingdom

Payment Method
------------------------------------------------------
Cash on Delivery


--=_af740aeca8635444b33d9ef5a7c57d63
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Microbuild<br>------------------------------------------------------<br>Ord=
er Number: 13<br>Detailed Invoice: https://www.microbuild.com/microbuild/ca=
talog/account_history_info.php?order_id=3D13<br>Date Ordered: Sunday 11 Sep=
tember, 2005<br><br>test purchase using html email<br><br>Products<br>-----=
-------------------------------------------------<br>1 x Elite System (Silv=
er) =3D =A3699<br>------------------------------------------------------<br=
>Sub-Total: =A3699<br>Flat Rate (Best Way): =A30<br>VAT: =A3104<br>Total: =
=A3699<br><br>Delivery Address<br>-----------------------------------------=
-------------<br>Acme Inc<br>Fred Bloggs<br>1 Way Street<br>Uptown<br>Metro=
polis, SO112PX<br>Hampshire, United Kingdom<br><br>Billing Address<br>-----=
-------------------------------------------------<br>Acme Inc<br>Fred Blogg=
s<br>1 Way Street<br>Uptown<br>Metropolis, SO112PX<br>Hampshire, United Kin=
gdom<br><br>Payment Method<br>---------------------------------------------=
---------<br>Cash on Delivery<br><br>
--=_af740aeca8635444b33d9ef5a7c57d63--
Fq:ߞ8wןz

 

I'd accidentally selected "cash on delivery" but wanted to use a credit card so I ran the test again only this time the email was blank, there was loads of garbled text in the source but the actual email you read was blank.

 

Hope this helps someone suss out what's going on.

 

Carbon

Link to comment
Share on other sites

Hi there,

 

To help us solve the problem when email sent from osc or phpbb2 (not normal email) gets incorrectly encoded I have cut&pasted a before and after of identical test transactions from osc.

 

Here's the BEFORE...

 

-------->8--------

 

To: "Andrew Bailey" <[email protected]>

Subject: Order Process

From: "Microbuild" <[email protected]>

MIME-Version: 1.0

X-Mailer: osCommerce Mailer

Content-Type: text/plain; charset="iso-8859-1"

X-xssl.net-MailScanner-Information: Please contact the ISP for more information

X-xssl.net-MailScanner: Found to be clean

X-MailScanner-From: [email protected]

Content-Transfer-Encoding: quoted-printable

X-MIME-Autoconverted: from 8bit to quoted-printable by spartan.xssl.net id j88I3XcV029018

 

 

Microbuild

------------------------------------------------------

Order Number: 5

Detailed Invoice: https://www.microbuild.com/microbuild/catalog/account_h=

istory_info.php?order_id=3D5

Date Ordered: Thursday 08 September, 2005

 

test purchase of elite system

 

Products

------------------------------------------------------

1 x Elite System (Elite System) =3D =A3699

------------------------------------------------------

Sub-Total: =A3699

Flat Rate (Best Way): =A30

VAT: =A3104

Total: =A3699

 

Delivery Address

------------------------------------------------------

Microbuild

Andrew Bailey

1 Way Street

Uptown

Metropolis, SO112PX

Hampshire, United Kingdom

 

Billing Address

------------------------------------------------------

Microbuild

Andrew Bailey

1 Way Street

Uptown

Metropolis, SO112PX

Hampshire, United Kingdom

 

Payment Method

------------------------------------------------------

Credit Card

 

 

 

 

 

--------------->8-------------

 

 

...and here's the AFTER...

 

 

--------------->8-------------

 

 

To: "Andrew Bailey" <[email protected]>

Subject: Order Process

From: "Microbuild" <[email protected]>

MIME-Version: 1.0

X-Mailer: osCommerce Mailer

Content-Type: text/plain; charset="iso-8859-1"

Content-Transfer-Encoding: 7bit

Mime-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: BASE64

X-xssl.net-MailScanner-Information: Please contact the ISP for more information

X-xssl.net-MailScanner: Found to be clean

X-MailScanner-From: [email protected]

 

TWljcm9idWlsZAotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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ZXRob2QKLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t

LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCkNhc2ggb24gRGVsaXZlcnkKCgo=

 

 

 

----------------->8---------------

 

 

You can clearly see that "something" has now ADDED these lines.....

 

 

Content-Transfer-Encoding: 7bit

Mime-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: BASE64

 

 

and REMOVED these lines.....

 

 

Content-Transfer-Encoding: quoted-printable

X-MIME-Autoconverted: from 8bit to quoted-printable by spartan.xssl.net id j88I3XcV029018

 

 

 

This, I beleive is what is causing the problem. I don't know what has changed to make this happen as the only "work" I did on my site between the "before" and the "after" was....

 

 

1: Added a modified copy of "shopping_cart.php" to my nav-sidebar. which I have rolled back to test and can rule out.

 

2: Modded application_top.php slightly to display product-name instead of product-model in the breadcrumb nav. Again I have rolled this change back and can rule it out as the cause.

 

3: Added UK zones (like HAMP for Hampshire) to the zones configuration manually using correct data inputted through the admin interface.

 

 

None of the above could have caused this problem to happen, and of course there's the fact that this problem also affects my forum which hasn't been changed in two weeks.

 

 

I hope this information proves useful

 

cheers

 

Andy

microbuild.com

 

 

 

BTW: The ? signs were correct in the actual "before" email but must of got scrambled by pasting into notepad.

 

 

cheers

 

Carbon

Link to comment
Share on other sites

Hi,

 

 

Turns out that the "php local.ini" file was corrupted. Don't ask me how as I couldn't even tell you where it is but luckily for me an upstanding member of my host company decided to tackle the problem and found the solution.

 

 

Thanks to all that offered help

 

 

Carbon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...