Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 ASP (Windows server) versions
 HTML emails not consistent
Author « Topic »  

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/15/2021 :  17:13:11  
I've come across a strange issue. All of a sudden, most order confirmation emails etc are being sent as plain text and sometimes as html. I am using .asp store7.2.3 with CDO email object. I've have htmlemails=TRUE in the includes file for years. Can't think of anything that has changed to cause this. I've restarted our server several times hoping it's one of those things but the problem is here to stay. What else can I check ? The customers are getting unformatted emails for their order confirmations and it doesn't look good. Help!

Subject: Order at your store
Date: Mon, 15 Feb 2021 18:04:14 -0500
Message-ID: <6085A46B0E5548CA9503ED1048B6AC04@EINSTEIN>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.3.9600.19940

dbdave
ECT Moderator

USA
10410 Posts

Posted - 02/15/2021 :  17:27:34  
Have you received the non html emails yourself?
The reason I ask is that some email clients will not accept an html email and will show the email as plain text.
Some mobile email clients still do not support HTML emails.

Occasionally with my store, a customer will reply to their email receipt and I can see the email was plain text.
It was readable though.

David

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/15/2021 :  19:07:33  
I am getting the order confirmations for sales myself and they are plain text making them mostly unreadable. I am also getting emails from customers saying our emails from the store are formatted wrong and I can see the same plain text email formatting in their replies to me.

Vince
Administrator

42766 Posts

Posted - 02/16/2021 :  00:53:03  
quote:
I've have htmlemails=TRUE in the includes file for years.
For quite a while now the HTML / non-HTML and all the other email settings are in the admin Main Settings page so can you check there to make sure that HTML Emails is set?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/16/2021 :  06:25:26  
Hi Vince, in the admin 'Email Settings', it's always been set to 'HTML Format Emails'. I've even tried to set it to plain text and then back to 'HTML Format Emails' with no relief.

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/16/2021 :  07:03:50  
I've installed aspEmail from Persists and changed to that email object in the admin.

I'll report back after some orders come in. I have a feeling the email object that we were using, CDO starting having problems causing this mess.

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/16/2021 :  14:21:52  
Switching from CDO mail object to aspEmail made no difference. Still getting plain text emails for order confirmations and the customers are receiving these too. ARG>

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/16/2021 :  15:16:15  
So comparing an order confirmation email that is correct to an email that is not correct, this text is missing from the non-HTML formatted email:

Content-Type: text/html

quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">body{font-size:11px; font-family: Tahoma, Helvetica, Arial, Verdana}hr{height: 0;border-width: 1px 0 0 0;border-style: solid;border-color: #006AC8;}</style></head><body class="receiptbody"><style type="text/css">



Where is this code coming from and why is this ending up in only some of the order confirmation emails?

Vince
Administrator

42766 Posts

Posted - 02/17/2021 :  02:17:00  
That is the default document type header that is inserted if don't include your own headers. Have you set email headers that include an <html> tag by any chance?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/17/2021 :  06:37:50  
Hi Vince, I've tried to put the html tag and saving it, but it doesn't appear in the header. The tag is also missing in the admin like I didn't add or save it.

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/17/2021 :  14:08:38  
So this problem is driving me crazy, here is a pattern that will hopefully help figure this out.

When a customer checks out and there is a sale, the email I get for order confirmation and also the email the customer gets is formatted plain text and it does not show properly in the email client. Looking in the source of these emails it's missing "Content-Type: text/html"

If I use the vsadmin section and click 'Resend Email' on the specific order, choosing 'Customer' and/or 'Order at your store', these emails are formatted properly and display properly. These emails have the "Content-Type: text/html" in the header. Also, if I send the abandoned cart emails from inside the vsadmin section, these are formatted properly too.

What in the world is going on here?

Vince
Administrator

42766 Posts

Posted - 02/18/2021 :  00:36:28  
quote:
Hi Vince, I've tried to put the html tag and saving it, but it doesn't appear in the header.
If you have your own header then the cart doesn't add the default headers so it's not that you want to add this <html> tag but rather that I think it is in the HTML of one of the email messages and that's what is causing the problem.
Can you go to ECT Admin -> Email Messages and check the different messages to see what is set there. Make sure you have no <html> tags etc. If that doesn't help, can you send me the site FTP login to my email (vince AT ecommercetemplates DOT com) and I'll dig in and see what is up.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Vince
Administrator

42766 Posts

Posted - 02/18/2021 :  12:59:59  
I've been investigating and it seems that the incfunctions.asp file is being included twice. The first time sets the default value for the "htmlemails" parameter, but then the database is called to pull the values defined in admin and the htmlemails parameter is set to TRUE. Then the incfunctions.asp file is included again and the htmlemails parameter is set to its default value of FALSE and then the function is called to pull the values from the database, but as we've already got them it's not executed and the value remains at false.
The simple solution is to just included the files like incfunctions.asp one time, but the thing is I can't see where it is included the first time. In thanks.asp it's just before the incthanks.asp include...

<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/incthanks.asp"-->

But at the top of the file before the opening <html> tag you have...

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/metainfo.asp"-->

...and by rights that should error. Then comes the sidebar include which displays the mini css and which again should error if incfunctions were not included.

Anyway, for now it's working because I've added a line to incfunctions near the top...

alreadygotadmin=FALSE

...which resets the system so the database values are pulled a second time. But do you know anything about what is going on here as it all seems a bit strange. Also, the usual way around this would be to include all the include files in the same place, before the <HTML> tag like this...

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/metainfo.asp"-->

Would that be a possibility?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

xxcfdrr
Advanced Member

USA
231 Posts

Posted - 02/19/2021 :  08:28:25  
Hi Vince, thanks so much for looking under the hood on this one. The problem is now fixed! Thank you again for a great product and great service to boot! Have a great weekend.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000