Order email arrived displaying HTML code


https://forum.kartris.com/Topic2057.aspx
Print Topic | Close Window

By mountier - Mon 13 May 2013
The order confirmation that has been received for the first live test order was received but the contents were displayed as HTML, it looks as if the charset wasn't being used.

When test orders were placed they worked fine and the emails delivered without any issues. The only difference between the test and live order was that the test ones were carried out as PO Offline orders and the live was made via PayPal.

Is there any obvious reason/solution for this?
By mountier - Tue 4 Mar 2014
Hi everyone, I'm bumping this up in the hope that someone has an idea about what may be causing this issue as it's happened again.

When completing an order via Offline payment the order email comes through fine but when the order goes through PayPal it renders the confirmation email as code-based.

It's quite an urgent one as the volume of orders is increasing at the moment and the client is getting understandably concerned.

Any help is greatly appreciated.
By Paul - Tue 4 Mar 2014
are you sure you have mail templates in place in the skin for the language used?
By mountier - Tue 4 Mar 2014
Yes, they are in the correct location.
It does work when completing an order that is an offline PO purchase but when using PayPal it renders the email as text rather than HTML.

This only happens when sending the copy to the admin of the site, the customer gets a properly rendered version
By Paul - Tue 4 Mar 2014
The two email sends are in the callback.aspx.vb file in the root of the site. There are comment blocks that headline both the mail send to customer, and to store admin.

Whether HTML is used or not should depend on the same boolean value for both (at least in the latest file I can see which is checked into codeplex);

SendEmail(strFromEmail, UsersBLL.GetEmailByID(O_CustomerID), GetGlobalResourceObject("Email", "Config_Subjectline") & " (#" & O_ID & ")", strCustomerEmailText, , , , , blnUseHTMLOrderEmail)

And the store owner email:
SendEmail(strFromEmail, LanguagesBLL.GetEmailTo(1), GetGlobalResourceObject("Email", "Config_Subjectline2") & " (#" & O_ID & ")", strStoreEmailText, , , , , blnUseHTMLOrderEmail)


(note the true/false value 'blnUseHTMLOrderEmail')
By mountier - Wed 5 Mar 2014
Perfect. That worked.

Thank you so much