Forums / General Questions / HTML customer emails not working

HTML customer emails not working

Locked

Started by sonnie on 17 May 2007, 1:52 AM · Views: 6,554

Results 21 to 25 of 25
This thread is locked. New replies are disabled.
19 May 2007, 7:08 PM
#21
sonnie avatar

sonnie

New Zenner

Join Date:
May 2007
Location:
Oregon Coast
Posts:
15
Plugin Contributions:
0

HTML customer emails not working

Man, that looked like it would work. Made the changes, here is that section from the file:

/**

  • Set some defaults
    /
    $process = false;
    $zone_name = '';
    $entry_state_has_zones = '';
    $error_state_input = false;
    $state = '';
    $zone_id = 0;
    $error = false;
    $email_format = (ACCOUNT_EMAIL_PREFERENCE == '1' ? 'HTML' : 'TEXT');
    $newsletter = (ACCOUNT_NEWSLETTER_STATUS == '1' ? false : true);
    /
    *
  • Process form contents
    */

And removed the redundant lines.

customers_email_format field in the customer record is still not being updated in the database when a customer signs up. Other fields are being populated as they should. The field is totally blank. As before, if a customer goes into view or change my account information, clicks update, the customers_email_format field is written to.

19 May 2007, 7:54 PM
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: HTML customer emails not working

Down around line 68 is another line that needs to be deactivated.
Add the // marks as shown:

  $country = zen_db_prepare_input($_POST['zone_country_id']);
  $telephone = zen_db_prepare_input($_POST['telephone']);
  $fax = zen_db_prepare_input($_POST['fax']);
[B]//[/B]  $email_format = zen_db_prepare_input($_POST['email_format']);
  $customers_authorization = CUSTOMERS_APPROVAL_AUTHORIZATION;
  $customers_referral = zen_db_prepare_input($_POST['customers_referral']);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 May 2007, 8:09 PM
#23
sonnie avatar

sonnie

New Zenner

Join Date:
May 2007
Location:
Oregon Coast
Posts:
15
Plugin Contributions:
0

Re: HTML customer emails not working

DrByte:

Down around line 68 is another line that needs to be deactivated.
Add the // marks as shown:

$country = zen_db_prepare_input($_POST['zone_country_id']);
$telephone = zen_db_prepare_input($_POST['telephone']);
$fax = zen_db_prepare_input($_POST['fax']);
[B]//[/B] $email_format = zen_db_prepare_input($_POST['email_format']);
$customers_authorization = CUSTOMERS_APPROVAL_AUTHORIZATION;
$customers_referral = zen_db_prepare_input($_POST['customers_referral']);


That did it! Success! Thanks DrByte and also Chuckl for all the help. I'm sure there are so many unique situations and configurations we users are coming up with that it is impossible to predict them all. Again, many thanks.

Jim
27 Aug 2007, 2:40 AM
#24
nonamejava avatar

nonamejava

New Zenner

Join Date:
Jul 2007
Posts:
9
Plugin Contributions:
0

Re: HTML customer emails not working

I am having the same problem. Email sent from within admin go as HTML, but the welcome email still comes across at plain text with no line breaks or bold text. Like this:

Dear Mr. X,
We wish to welcome you to NoNameJava.com.
With your account, you can now take part in the various services we have to offer you. Some of these services include: Permanent Cart - Any products added to your online cart remain there until you remove them, or check them out. Address Book - We can now deliver your products to another address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves. Order History - View your history of purchases that you have made with us. Products Reviews - Share your opinions on products with our other customers.
For help with any of our online services, please email the store-owner: [email protected]
Sincerely,

Roast Master
Store Owner

http://www.nonamejava.com/

I have tried everything as instructed in this thread. I have a fresh intstall of v 1.37 and have tried all variations of settings and made file changes as above.

Any further ideas on how to fix this?

Thanks,
-Todd

27 Aug 2007, 8:52 AM
#25
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: HTML customer emails not working

The HTML messages are sent with a plain text as well as an HTML section.i.e. as a multipart message. The format you are referring to in your post is typical of text extracted from an HTML message, rather than a true text welcome message.
Some mail readers however automatically choose the first section of a multipart message rather than the most 'complex', so it's worth looking at the message source to see if there is a text/html section in the message.

SImilarly, if the HTML is 'broken' in some way, it may be falling back to the text version.

Another possibilty is that it cannot find the email templates in the /email/ folder, because of permissions or similar.

Some mail services, particularly the web based services are also fairly ruthless in stripping out HTML that they have decided they don't like.

And of course check that the test customers email preference is set to HTML, not NULL or TEXT.