View Single Post
  #1  
Old 01-14-2003, 06:49 PM
 
dpumphrey dpumphrey is offline
 

Newbie
  
Join Date: Oct 2002
Location: Indianapolis, Indiana USA
Posts: 9
 

Default 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/
Reply With Quote