Zen Cart Logo
Forums / General Questions / Can I force html with every email?

Can I force html with every email?

Locked

Views: 4,901

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
16 Feb 2012, 11:45 AM
#1
linnx avatar

linnx

Zen Follower

Join Date:
Jun 2009
Posts:
187
Plugin Contributions:
0

Can I force html with every email?

I tried searching for the answer but could only find how to change the default which I have already done.

Is it possible to force Zen Cart to always send emails in html format regardless of setting chosen during registration?

I've already changed the default during registration to html (setting 1), but I want to force html for those customers that registered a long time ago when I had the default as text.

If you know how to do this, please let me know.

I'm looking at includes/functions/function_email.php but I really am not sure what to change there. If this is even the right file.

Thanks!

16 Feb 2012, 11:52 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Can I force html with every email?

I know how to do it, but I'm not talking. If I bought something from you and selected plain text (and I always do) it seems the height of, well, rudeness to later inflict HTML on me. In some countries, it's against the law.

16 Feb 2012, 12:00 PM
#3
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can I force html with every email?

linnx:

Is it possible to force Zen Cart to always send emails in html format regardless of setting chosen during registration?

I'm with Stevesh on this one. Having HTML inflicted upon me when when I choose plain text (as I always do too) would be considered the height of rudeness and it would be highly unlikely that I'd ever return to the store again.

You should seriously re-consider this proposal.

Cheers
Rod

16 Feb 2012, 12:07 PM
#4
linnx avatar

linnx

Zen Follower

Join Date:
Jun 2009
Posts:
187
Plugin Contributions:
0

Re: Can I force html with every email?

The problem I have is that for the first year the default was set to text.

Many of my customers have complained the emails are being sent in txt format, and they are too lazy to switch it. So I was hoping for a solution where I can switch it for them for certain promotions that go out.

I've also know from personal experience that ugly text emails get deleted immediately. I am the opposite as you, and so are most of my customers. Emails that get sent in txt are are deleted immediately and are not even read.

I wonder how many users actually prefer text and not html? Most modern browsers support html, the age of text based email has long gone.

16 Feb 2012, 12:18 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Can I force html with every email?

linnx:

Many of my customers have complained the emails are being sent in txt format, and they are too lazy to switch it.

Sorry, but that doesn't make any sense. They're complaining about receiving text email, you're informing them as to how to change their selection, and they just continue to complain ?

If most of your customers are anything like mine, they look at the From line and Subject line of the message to see who the email is from before deleting it, plain text or not.

Most people just use whatever the default is set to, and you can do that in admin. My objection was to your retroactive decision to change my selection (and don't just ignore the part about doing so being unlawful in some places).

16 Feb 2012, 12:32 PM
#6
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Can I force html with every email?

stevesh:

Sorry, but that doesn't make any sense. They're complaining about receiving text email, you're informing them as to how to change their selection, and they just continue to complain ?

If most of your customers are anything like mine, they look at the From line and Subject line of the message to see who the email is from before deleting it, plain text or not.

Most people just use whatever the default is set to, and you can do that in admin. My objection was to your retroactive decision to change my selection (and don't just ignore the part about doing so being unlawful in some places).

Stevesh, I had to chime in here, because you are saying that it doesn't make sense for customers to complain about getting text emails, yet you would complain about receiving HTML emails?

Furthermore, linnix's customers may not be like yours. For example, certain companies have a client base that are not computer savvy or senior citizens. So in these cases we can choose to send out emails in whatever format we so choose that fits with our client bases, and as you said, its would be your right to unsubscribe or shop there in the future. Receiving an HTML format email seems a silly reason to discontinue shopping with someone though, especially after mentioning that you find it to be silly to complain about text emails.

As for your contention that it is illegal in some places, I would like to call you out on that. Please site a locale and your source of information that sending an email in a different format than that requested is "illegal". Its one thing to make an unsubstantiated claim that may not even effect linnix unless he does business in that locale, its another to scare people with legal problems.

What it boils down to is common sense, knowing when to do it and when not to.

16 Feb 2012, 12:37 PM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can I force html with every email?

linnx:

The problem I have is that for the first year the default was set to text.

Irrelevant.

linnx:

Many of my customers have complained the emails are being sent in txt format

With respect, I find this difficult to believe.

linnx:

, and they are too lazy to switch it.

They've told you that have they?
Again, I find this difficult to believe, but even if it were true it is no reason to inflict HTML on those that had opted for text only.

Why should I suffer because you have one or two 'lazy' customers?

linnx:

So I was hoping for a solution where I can switch it for them for certain promotions that go out.

I've also know from personal experience that ugly text emails get deleted immediately.

And I know from experience that (with few whitelisted exceptions) any HTML emails I recieve get forwarded direclty into my spam folder, never to be seen.

Is that what you really want.

linnx:

I am the opposite as you,

Obviously.

I am one of the 'strange' people that believe Web pages were designed for HTML and Email was designed to be text based.

Strange thing is, the RFC's (you know about them right?) actually back up my beliefs.

HTML emails are little more than a 'kludge' that has ended up being responsible for the transmission of 99% of the viruses floating around. Without HTML emails it is impossible for a virus to spread in this manner (which is why I send them straight to the junk folder).

linnx:

and so are most of my customers.

You said it, so it must be true eh?

linnx:

Emails that get sent in txt are are deleted immediately and are not even read.

Not in this household, and not with any of my students either.
I teach the safe networking practices.

linnx:

I wonder how many users actually prefer text and not html?

All of the smart ones :)

linnx:

Most modern browsers support html

Errr, I think you'll find that every browser ever written supports HTML, on account of the fact that HTML would be pointless otherwise

linnx:

the age of text based email has long gone.

Yes, and we have flying cars, man has landed on Mars, and Skynet is about to take over the world.

You won't like this, but please do a little bit of research as to how Email actually works at the network layer. In spite of being over 30 years old, it is still primarily a text based system (and by text based I mean it only uses 7 bit data (127 different characters). I'll leave it up to you to determine how it manages 8bit data and/or HTML.

Cheers
Rod

16 Feb 2012, 12:44 PM
#8
linnx avatar

linnx

Zen Follower

Join Date:
Jun 2009
Posts:
187
Plugin Contributions:
0

Re: Can I force html with every email?

These comments are irrelevant to the question being asked. I asked how I can change it, not for the reasons why we should not do this.

Zen Cart is a customizable solution where I can customize it for my needs. And I have a need to send html email.

I am getting somewhere in case anyone wants to change it.

Find includes/functions/functions_email.php

And find

  if ($customers_email_format == '' && ADMIN_EXTRA_EMAIL_FORMAT == 'HTML' && in_array($module, array('newsletters', 'product_notification')) && isset($_SESSION['admin_id'])) {
    $customers_email_format = 'HTML';
  }

I will modify the above and see how this works. After I test it, I'll post back and let everyone know if it worked or not.

16 Feb 2012, 12:49 PM
#9
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can I force html with every email?

gingabox:

Receiving an HTML format email seems a silly reason to discontinue shopping with someone though,
.

It was actually me that stated I'd boycott a store because of this, but NOT so much because I was sent HTML emails, but because MY CHOICE was IGNORED and changed without consent, and probably without warning.

However, having said that, it assumes that I would have recieved the email in the first place, which is doubtful.

gingabox:

What it boils down to is common sense, knowing when to do it and when not to.

I dissagree. common sense dictates that that only a fool would run the risk of being virus infected via an email when there is a very simple way to avoid such infections. Namly, refuse to accept these risk prone emails.

As for knowing when to do it and when not to, all I can say is that if a customer elects for text only emails it should be plainly obvious that sending them html emails is something that should NOT be done.

Your arguments are invalid.

Cheers
Rod

PS. If people wish (or need) me to see something in HTML I request they place the file on a webserver, where HTML belongs and have them send me a text link to the page via email. This is the correct way do do things.

16 Feb 2012, 12:55 PM
#10
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Can I force html with every email?

Rod, if HTML emails go directly to your spam box, what are you complaining about, you would never see it anyway, right?

HTML emails account for 99% of viruses, ergo, we shouldn't use them? With that logic we should have outlawed a whole range of things that can be used to ill gain, and yet we don't because there is a time and place for them. I should stop walking across the street because cars cause the majority of injuries when doing so, eh? That cuts McDs out too.

As I said, it might not be right for Rod's customers but it might be right for linnx's, its about judging the situation rightly, not about imposing some universal standard of web ethics that others including Rod have decided to adopt.

16 Feb 2012, 12:59 PM
#11
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can I force html with every email?

linnx:

I have a need to send html email.

You are confusing 'need' with 'want'.

There is never a need for anyone to send HTML emails, ever.

A lot of people want to send (and even recieve) HTML emails because they would rather have 'pretty pictures' than 'useful content'.

Question1. What is the benefit of sending an HTML email rather than a link to an HTML page?

Question2. What are the disadvantages of sending an HTML email rather than a link to an HTML page?

If you answer honestly and accurately, it will become quite apparent that there are far more dis-advantages to HTML Emails than there are advantages.

Cheers
Rod

16 Feb 2012, 1:02 PM
#12
linnx avatar

linnx

Zen Follower

Join Date:
Jun 2009
Posts:
187
Plugin Contributions:
0

Re: Can I force html with every email?

RodG has not contributed anything to this thread other than to be a troll. But we all know that trolls are all over the place.

Does that mean I wont come onto the Zen Cart forum to ask a question? No, not at all. I know there are trolls lurking behind every corner.

The purpose of this thread was to find a solution to a problem. Hopefully someone will be able to make use of the information, and if not, they can at least learn how Zen Cart works.

I did not come here to ask if I should or should not do something, I asked for a solution to a problem. A problem which has now been fixed!

16 Feb 2012, 1:03 PM
#13
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Can I force html with every email?

RodG:

Your arguments are invalid.

:lamo:
What is this? My arguments are invalid... your right, there is never a time when its the right thing to do. RodG hath said it, so shall it be written.

16 Feb 2012, 1:13 PM
#14
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Can I force html with every email?

RodG:

Question1. What is the benefit of sending an HTML email rather than a link to an HTML page?

Question2. What are the disadvantages of sending an HTML email rather than a link to an HTML page?

If you answer honestly and accurately, it will become quite apparent that there are far more dis-advantages to HTML Emails than there are advantages.

Question 1. What is the benefit of shooting someone inside your home?

Question 2. What are the disadvantages of shooting someone inside your home?

If you answer honestly and accurately, it will become quite apparent that there are far more dis-advantages to shooting someone inside your home than there are advantages.... AND yet there is a time when even something so drastic is preferred to the alternative.

16 Feb 2012, 1:32 PM
#15
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can I force html with every email?

gingabox:

Rod, if HTML emails go directly to your spam box, what are you complaining about, you would never see it anyway, right?
.

That's right.
BTW, I'm NOT complaining, I'm responding to a person that is hellbent on alienating many of his/her customers.

gingabox:

HTML emails account for 99% of viruses, ergo, we shouldn't use them?

If people wish to partake in unsafe practices that is their choice, but at the same time it would be amiss if us older (and wiser) folk didn't take the time to warn of the potential dangers.

gingabox:

With that logic we should have outlawed a whole range of things that can be used to ill gain,

Unsafe sax causes births, deaths and lots of nasty things in between. It would be foolish to try to outlaw it though, so all we can do is try to educate people.

Whether people accept the education is another story, but please don't stone us for at least trying.

gingabox:

and yet we don't because there is a time and place for them. I should stop walking across the street because cars cause the majority of injuries when doing so, eh? That cuts McDs out too.

One would assume that you were taught to look both ways before crossing though (even at a pedestrian crossing).

It is sad, but people are NOT being taught about the dangers of HTML emails. Seriously, can YOU list all of the different ways that HTML can cause people problems.

Doesn't it strike you as 'strange' that Anti-Virus companies make a small fortune selling their wares when for the most part the majority of people would be better protected without such software if they were taught to simply discard HTML emails?

To me, this simply doesn't make any sense, and putting it bluntly, it all boils down to a lack of knowledge.

gingabox:

As I said, it might not be right for Rod's customers but it might be right for linnx's,

In other words, neither you, not linnix actually give a damn about your customers security... you consider this to be their responsibilty and theirs alone. Neither of you are even willing to inform them of the possible dangers they face.

This is either unconscionable, or just plain ignorant. Your choice.

gingabox:

its about judging the situation rightly, not about imposing some universal standard of web ethics that others including Rod have decided to adopt.

As I stated earlier, I believe in safe networking practices. This not only defines what I do, but because I consider myself a responsible adult I feel it to be my duty to inform others of the dangers. Sure, I can't force people to follow my recommendations, just as the medicos can't force people to have safe sax, but would you actually argue the point with a medico? No, of course not, the medico has years of training and experience behind them.
Guess what. I have years of experience and training behind me too, so what makes you think your views are going to be more valid than mine?

All being well, this thread will be indexed by Google within a few hours, and guess what, If just one person reads this and says to themselves 'hey, this guy actually knows something that could be good for me, and save me $$$ to boot', and then proceeds to dump all HTML's into a spam folder then I'll be just as happy as the old fashioned medico that saves just one person from contracting a crippling or life threatening disease.

Enuff said?

Cheers
Rod

16 Feb 2012, 1:43 PM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Can I force html with every email?

gingabox:

Question 1. What is the benefit of shooting someone inside your home?

  1. It is easier to claim self defense.
  2. You are not likely to have any witnesses to testify against you.
  3. You have more chance of moving and/or hiding the body without being detected.
  4. You probably have more choice of guns at home.
  5. You don't have to wait around in the cold waiting for the police to show (assuming you report it)

gingabox:

Question 2. What are the disadvantages of shooting someone inside your home?

  1. It can be really hard to get rid of the bloodstains
  2. There is likely to be DNA evidence of the victim (should you dispose of the body).

gingabox:

If you answer honestly and accurately, it will become quite apparent that there are far more dis-advantages to shooting someone inside your home than there are advantages

That not what my lists shows. What have I overlooked?

Cheers
Rod

16 Feb 2012, 2:18 PM
#17
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Can I force html with every email?

gingabox:

Stevesh, I had to chime in here, because you are saying that it doesn't make sense for customers to complain about getting text emails, yet you would complain about receiving HTML emails?

Um, no. What I said was that it doesn't make sense for a customer to complain about receiving plain-text emails from an ecommerce site, receive instructions on how to change that option from the ecommerce site, then not make that change, continuing to complain instead.. I don't believe that has ever happened.

I would never complain about a website not honoring my email format choice. I just wouldn't return to that site again.

The point I was making in my first post is that it really doesn't matter what your 'client base' is, or what you want to send them. If you offer a choice (as the OP did/does) you have an ethical responsibility to honor that choice, now and going forward.

As for my (and RodG's) replies not being relevant, I'll disagree. This forum isn't a Knowledge Base with bots presenting boilerplate 'answers' to questions. It's a community, and if you ask a question about how to do something we don't think is a good idea, we'll say so. I'm thinking you should appreciate that.

As an example, I wouldn't tell a Zenner how to find or install a manual credit card processing mod, either.

16 Feb 2012, 2:44 PM
#18
gingabox avatar

gingabox

New Zenner

Join Date:
Apr 2009
Posts:
35
Plugin Contributions:
0

Re: Can I force html with every email?

RodG:

That's right.
BTW, I'm NOT complaining, I'm responding to a person that is hellbent on alienating many of his/her customers.
You assume he will alienate his customers, but you don't even know what his customer base is and are making assumptions that are simply based on your adopted standards and may not reflect accurately his situation. And you know that, whether you admit it or not.

RodG:

If people wish to partake in unsafe practices that is their choice, but at the same time it would be amiss if us older (and wiser) folk didn't take the time to warn of the potential dangers.
Nor do I fault anyone for warning, it is the way in which you have done it, both rudely and smugly because they don't hold to your same values... sounds a bit tyrannical.

RodG:

Unsafe sax causes births, deaths and lots of nasty things in between. It would be foolish to try to outlaw it though, so all we can do is try to educate people.
Tis true, it does cause those things, yet if you restrict your "saxing" within a monogamous relationship, the nasty things are also nill, without the need for additional protective measures. Again, knowing your partner is analogous to knowing your customers, right and wrong times etc.

RodG:

One would assume that you were taught to look both ways before crossing though (even at a pedestrian crossing).
As I said, its using common sense, knowing the situation. Looking both ways doesn't lead me to not cross, it leads them to cross at the right time and place.

RodG:

It is sad, but people are NOT being taught about the dangers of HTML emails. Seriously, can YOU list all of the different ways that HTML can cause people problems.
Yes, and I can also list all the dangers inherent in the rest of the web, and yet here we are. Whats the difference between what you are doing and the fear mongers who want to get everyone in a tizzy?

RodG:

Doesn't it strike you as 'strange' that Anti-Virus companies make a small fortune selling their wares when for the most part the majority of people would be better protected without such software if they were taught to simply discard HTML emails?
A: No it doesn't strike me as odd because the root cause is the people writing malicious code, not HTML email.
B: Getting rid of HTML email doesn't render you invincible on the web. If you download anything, if you watch videos, if you surf to the wrong site, you are at risk... so anti-virus companies will be gainfully employed until shady people stop writing malicious code.
C: You are giving a false impression of security when you say that discarding HTML mail they can just discard the anti-malware, just as you are when you say "safe sax"... bagging it still has risks and people shouldn't discard HTML emails and think they have no need for virus protection. Yet I don't see you warning anyone about that, you just advised people to do something very risky, is that "unconscionable, or just plain ignorant"?

RodG:

In other words, neither you, not linnix actually give a damn about your customers security... you consider this to be their responsibilty and theirs alone. Neither of you are even willing to inform them of the possible dangers they face.
That is a false dichotomy RodG. To say that we don't "give a damn about" our customers security because we send an HTML mail from a clean source makes as much sense as saying that you don't give a damn about your customers because you don't warm them of the dangers they face on the rest of the web. Do you do that when you sell a widget? You send a text email warning them of all the malicious sites, embedded trojans and the like? If your company sells candles lets say, then I am sure you wouldn't, yet if you sell security services, then you would, why are companies now responsible for educating customers on things that are unrelated to the products they sell?

RodG:

This is either unconscionable, or just plain ignorant. Your choice.
As are half your smug, "holier than thou" comments, read above.

RodG:

Sure, I can't force people to follow my recommendations, just as the medicos can't force people to have safe sax, but would you actually argue the point with a medico? No, of course not, the medico has years of training and experience behind them.
Yes, actually I would argue the point if he was saying that there were never a time and place for unprotected "sax" (as you say for sending HTML email)... there is a time and place for it :oops:.

RodG:

Guess what. I have years of experience and training behind me too, so what makes you think your views are going to be more valid than mine?
Maybe because you aren't the only one that has years of experience and training... guess what, 9 out of 10 doctors disagree on a wide variety of remedies. Doesn't mean you are wrong, but it doesn't mean you are always right either.

RodG:

All being well, this thread will be indexed by Google within a few hours, and guess what, If just one person reads this and says to themselves 'hey, this guy actually knows something that could be good for me, and save me $$$ to boot', and then proceeds to dump all HTML's into a spam folder then I'll be just as happy as the old fashioned medico that saves just one person from contracting a crippling or life threatening disease.
And if just one person does that, great on ya, freedom is grand... but if just one reads this and says to themselves "hey, why am I letting what amounts to online terrorism take away from what would benefit me... I should just use common sense and protect myself with valid anti-malware, SPAM filters and not open email from suspicious addresses instead of throwing the baby out with the bath water and putting myself at risk" then I will be just as happy as the old fashioned vet who fought to protect people's freedoms knowing full well that everyone of them was one day going to die of a crippling and life threatening disease - everyone does at the end of their lives don't they...

But as it was said in Braveheart "every man dies, but not every man truly lives"

RodG:

Enuff said?
Now it is, there are differences of opinion on things such as this, people can choose to go the cautious totalitarian route, or the cautious libertarian route... both have risks, both have benefits, weigh them and proceed onward.

linnix, glad you got it taken care of and I am sure someone will benefit from the code you shared.

16 Feb 2012, 3:16 PM
#19
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Can I force html with every email?

One thing seems to be being ignored here. You say the majority (even if it's the "vast majority") of your customers want HTML e-mail. Has ANYONE ever knowingly selected text only on your site? If so, you are going against their explicit wishes and it is possible that your HTML e-mails will not display properly in their inbox depending on their mail client. You are eliminating all choice for them. Think about that one...

16 Feb 2012, 3:22 PM
#20
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Can I force html with every email?

If you think (most of) your old customers would have selected HTML, it would be possible to change their settings in the database (I don't know exactly how, and wouldn't try to tell you if I did) and leave current and new customers the freedom to receive your e-mails in their preferred format.