Forums / Templates, Stylesheets, Page Layout / e-mail templates, footer plaintext doesn't match HTML?

e-mail templates, footer plaintext doesn't match HTML?

Locked

Started by funkey on 11 Oct 2006, 1:32 AM · Views: 2,639

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
11 Oct 2006, 1:32 AM
#1
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

e-mail templates, footer plaintext doesn't match HTML?

Hi everyone,

I'm using ZC 1.2.7 (that's been customised everywhere but the e-mail functions) and i've been scratching my head trying to get the footer/disclaimer onto a plain text e-mail.

In short, it just doesn't seem to work -- if I define EMAIL_FOOTER_COPYRIGHT and EMAIL_DISCLAIMER in both the admin/includes and includes/ directories, the welcome e-mail will print both of them on the HTML based e-mail (which works), but neither of them on the plain text one.

If I set the MIME type in the admin to TEXT, it doesn't print them on the welcome e-mail either, just to clarify.

Sending e-mail works -- receiving does too, so everything works OK, it just doesn't look good :)

Having a look through includes/functions/functions_email.php, I see that the references to these defines (starting at line 235) are in a function called zen_build_html_email_from_template, could that have something to do with it?

Any help, or advice where to look next, would be appreciated.

Paul

12 Oct 2006, 2:13 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: e-mail templates, footer plaintext doesn't match HTML?

by default, an email sent as text will not include html formatting and will default to text only. This is a function of how the recipient can receive mail and not one specific to ZenCart.

Zen-Venom Get Bitten

12 Oct 2006, 7:01 AM
#3
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: e-mail templates, footer plaintext doesn't match HTML?

kobra:

by default, an email sent as text will not include html formatting and will default to text only. This is a function of how the recipient can receive mail and not one specific to ZenCart.

I'm aware of that, my thought process was more along the lines of 'maybe the spam/disclaimer messages are only included in the HTML message because the functions they are called from are sourced 'after' the text-only message has been generated'.

12 Oct 2006, 7:51 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: e-mail templates, footer plaintext doesn't match HTML?

Those texts are not included in non-HTML messages.

Feel free to add them if you like. You'll have to account for a few differences depending on which emails you're sending.

You could search for "zen_mail(" to find all the cases where an email message is sent, and then backtrack in the code to add the text from the additional constants as desired. About 27 places to edit.

.
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.

12 Oct 2006, 8:12 AM
#5
funkey avatar

funkey

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: e-mail templates, footer plaintext doesn't match HTML?

DrByte:

Those texts are not included in non-HTML messages.

Feel free to add them if you like. You'll have to account for a few differences depending on which emails you're sending.

You could search for "zen_mail(" to find all the cases where an email message is sent, and then backtrack in the code to add the text from the additional constants as desired. About 27 places to edit.

ah, figured that'd be something like the answer :)

Thanks DrByte -- would a patch be accepted by the ZC-team to fix this behaviour? ( after i've fixed it for me, i've got to fix it for 1.3.x too :) )

Paul

12 Oct 2006, 8:18 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: e-mail templates, footer plaintext doesn't match HTML?

feel free to post a patch if you feel others will benefit

the whole email system is being revamped to have its own templating system, which will make this issue less of a challenge in the future

.
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.

13 Feb 2007, 1:51 AM
#7
dogtags avatar

dogtags

Totally Zenned

Join Date:
Nov 2003
Posts:
876
Plugin Contributions:
1

Re: e-mail templates, footer plaintext doesn't match HTML?

DrByte:

the whole email system is being revamped to have its own templating system, which will make this issue less of a challenge in the future

Wow, excellent :smile: