| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Problem with text emails when HTML email is on... | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Problem with text emails when HTML email is on...
I have been baffling with this one for a while and will probably take a look at it soon if a fix is not available for it. I've searched on "HTML email", but haven't found any related articles on this forum regarding it...
Basically if I select to enable HTML email ( I want my newsletters to go out in HTML) and then modify my profile I get the following formatted email: Dear Daniel! Your profile has been modified. Your profile: --------------------- Username: dpumphrey First Name: Daniel Last Name: Pumphrey Billing Address: Address: XXXXXXXX City: Indianapolis State: Indiana Country: United States Zip code: XXXXX Shipping Address: Address: XXXXXCity: Indianapolis State: Indiana Country: United States Zip code: XXXX Phone: XXXXXX Fax: E-Mail: XXXXXXX URL: -- Thank you for using X-Cart shopping system Phone: (317) XXXXFax: (317) XXXX URL: www.WilsonCreekDesigns.com If I disable HTML email then the email comes formatted as such: Dear Daniel! Your profile has been modified. Your profile: --------------------- Username: dpumphrey First Name: Daniel Last Name: Pumphrey Billing Address: Address: XXXXX City: Indianapolis State: Indiana Country: United States Zip code: XXXXX Shipping Address: Address: XXXXX City: Indianapolis State: Indiana Country: United States Zip code: XXXX Phone: XXXXXX Fax: E-Mail: XXXXXX URL: -- Thank you for using X-Cart shopping system Phone: XXXXX Fax: XXXXXX URL: www.WilsonCreekDesigns.com The content of the email is a smarty template in /mail/profile_modified.tpl - I'm not real familair with this smarty stuff yet, but some pseudo PHP code would go like the following: If HTML_ENABLED = TRUE Then CrLf = " " 'could be or any other html code Else CrLf = vbCrLf ' whatever the php equiv would be - I come from an ASP world End If and then you place the $CrLf variable at the end of each line in the PHP code so that the proper new line characters are sent based on the email format selected. Obviously this is not valid PHP code, but I will be more than happy to post my fix if I do not find one and others are frustrated with the same problem as I. I have checked the email sent with several different email programs (outlook, outlook express, netscape mail, neomail, horde mail) with the same results so I'm pretty sure it is not a mail client problem.
__________________
Thanks Daniel Pumphrey Wilson Creek Designs Custom Business and Craft Stamps Live Site: http://www.WilsonCreekDesigns.com/ |
|||||||
#2
|
|||||||||
|
|||||||||
you would need to go in and add html formatting to the email files im afraid for them to work this way.
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#3
|
|||||||
|
|||||||
Solution?
Has anyone figured out a solution to this problem other than adding the html into the text? That method doesn't work for every email. For example the first line of an order confirmation is "Dear Name" which is not text that can be changed through the admin section.
__________________
|| E L E V E N || |
|||||||
#4
|
|||||||
|
|||||||
Have you tried using the php code:
nl2br($variable); where it picks up the line returns (\n) from the non html emails and converts them to a hence new line 2 br. Haven't though about how you would integerate this in yet...
__________________
ex x-cart guru |
|||||||
#5
|
|||||||||
|
|||||||||
I have the same problem - no line breaks in any of the emails. I haven't seen a clear solution posted - why in the world would this not be considered a bug?? Who would conceivably want their emails formatted as a continuos line?
Has anyone resolved with an easy fix?? |
|||||||||
#6
|
|||||||
|
|||||||
I ended up replacing every "\n" with a "
"
__________________
|| E L E V E N || |
|||||||
#7
|
|||||||||
|
|||||||||
You mean in all the email TPL files?
|
|||||||||
#8
|
|||||||
|
|||||||
yep. it's not that hard if you do a global find and replace. Or you could use funkydunk's solution above.
__________________
|| E L E V E N || |
|||||||
#9
|
|||||||
|
|||||||
my above solution wont work. sorry.
however, you can do a similar thing within smarty: Code:
this will convert all /n to
__________________
ex x-cart guru |
|||||||
|
|||
X-Cart forums © 2001-2020
|