Zen Cart Logo
Forums / General Questions / images not showing up in emails sent from admin

images not showing up in emails sent from admin

Views: 2,264

Results 1 to 20 of 22
26 Apr 2017, 5:46 AM
#1
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

images not showing up in emails sent from admin

emails I have sent to myself, at 3 different addresses, as a test from admin/tools/send_emails, on two different sites, are not showing the images placed in them using CKEditor and/or EDITOR_HTMLAREA when received (images showed OK in preview before sending). I am using Outlook Mail (the old Hotmail) as my email program however I do not have any issues receiving other emails with images.

any advice welcomed, thanks, Mike

26 Apr 2017, 10:13 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: images not showing up in emails sent from admin

Version information regarding ZC?

Have you reviewed the email send "log" to see that the image "text" is included correctly?

When you say you receive other emails with images just fine, what is the source of those emails with images? (ie. First are they emails sent from this store or just emails from anywhere else? Then what was the method of generation of the email like was it from an order being placed, etc?)

26 Apr 2017, 5:48 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: images not showing up in emails sent from admin

Since you sent those images via the Admin, the "path"/URL to those images is probably "relative to the admin directory", and since being logged in to the admin is required in order to access admin-related resources, your email client won't be able to display them.

When referencing images in HTML emails, you MUST ensure that the path you supply for the image is reachable without special privileges, and without knowing the admin directory name.

26 Apr 2017, 9:59 PM
#4
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

mc12345678:

Version information regarding ZC?

Have you reviewed the email send "log" to see that the image "text" is included correctly?

When you say you receive other emails with images just fine, what is the source of those emails with images? (ie. First are they emails sent from this store or just emails from anywhere else? Then what was the method of generation of the email like was it from an order being placed, etc?)

Thanks for your response MC - ZC version is 1.5.1 (I did select this from the drop down box, not sure why it didn't show?).

I haven't checked email logs as I have no idea where to find them?

I am trying to generate a 'promo' email for distribution to customer base sectors, using admin/tools/send_emails and EDITOR_HTMLAREA and inserting an image / images using url addresses for the images - images show up fine in the preview before sending but do not show in the email when received in my email client - the emails I receive in my email client are from myriads of sources and are not related to any emails from my store(s).

cheers, Mike

26 Apr 2017, 10:20 PM
#5
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

DrByte:

Since you sent those images via the Admin, the "path"/URL to those images is probably "relative to the admin directory", and since being logged in to the admin is required in order to access admin-related resources, your email client won't be able to display them.

When referencing images in HTML emails, you MUST ensure that the path you supply for the image is reachable without special privileges, and without knowing the admin directory name.
Thanks for your reply Doc - so if I read correctly, which I'm not sure that I am, even though I use a url address for an image, example http://www.harmonyballpendant.com/images/Harmony%20Balls/Harmony-ball-ornate-pendant-009.gif or http://www.harmonyballpendant.com/bmz_cache/4/4b819de0d2cdb883d6f6b344f90cb502.image.410x322.gif - is the image url changed in the email when sent to one that includes mystore/admin/'image_source' or the like? thus the email client not recognizing the image source? - doesn't quite gel with me otherwise the text editor image insertion feature would seem to be useless for emails?

So not having used the admin/tools/send_emails for sending emails other than plain text emails previously, is it not really suited to image insertion / making and sending promo emails?

cheers, Mike

26 Apr 2017, 11:57 PM
#6
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

Do the emailed images display as expected when delivered to a gmail or non-Outlook email client?
Outlook is known to not play nice with all html code. It took a while for us to figure that out.

27 Apr 2017, 12:09 AM
#7
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

RixStix:

Do the emailed images display as expected when delivered to a gmail or non-Outlook email client?
Outlook is known to not play nice with all html code. It took a while for us to figure that out.
Thanks for your response RixStix - I don't generally use gmail email even though I do have an account so I don't know if it would resolve OK but I will give it a try.
cheers, Mike

27 Apr 2017, 12:22 AM
#8
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

I took a look at admin/tools/newsletter_and_product_notification_manager and noticed that I used it successfully to send a promo email with images back in 2014 - was going to try using it now but it's configuration is different in that it doesn't have a 'select who to email to' drop down box but merely a send button and I am not sure what the next step is, i.e. whether it allows to select customers, individually or by groups, or whether it automatically sends to those that have elected to receive newsletters at signup - so it appears I can't send a sample email to myself to view how it will look?

The only difference between the two tools that I can see is the recipient selection drop down so kinda doubt one would work and not the other?, i.e. send images.

I figure it has to be something simple but what it is I'm not sure (obviously).

cheers, Mike

27 Apr 2017, 12:34 AM
#9
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

DrByte:

Since you sent those images via the Admin, the "path"/URL to those images is probably "relative to the admin directory", and since being logged in to the admin is required in order to access admin-related resources, your email client won't be able to display them.

When referencing images in HTML emails, you MUST ensure that the path you supply for the image is reachable without special privileges, and without knowing the admin directory name.

Doc - right click 'image source' in preview in admin/tools/send_email shows appropriate standard url path - no reference at all to admin.
cheers, Mike

27 Apr 2017, 1:47 AM
#11
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

mc12345678:

Have you also updated your phpmailer email code as referenced by: https://www.zen-cart.com/showthread.php?221619-Patch-PHPMailer-security-patch-%28Dec-2016%29-for-v155c-and-older
Yes MC - updated same day it was posted. Would be interested to know if you can successfully send an email with an image from your store admin using admin/tools/send_email ?
cheers, Mike

27 Apr 2017, 3:51 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: images not showing up in emails sent from admin

In the received emails, what displays instead of the image?

Also, what's the raw HTML of the received message? (view HTML source in the email client to see it)

In your first post you said you use Outlook. What happens in other clients besides Outlook?

27 Apr 2017, 4:37 AM
#13
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

DrByte:

In the received emails, what displays instead of the image?

Also, what's the raw HTML of the received message? (view HTML source in the email client to see it)

In your first post you said you use Outlook. What happens in other clients besides Outlook?

  1. nothing displays at all other than the included text that I wrote - a blank gap appears where the image should be - in tests that were image only absolutely nothing appears except for the ZC disclaimer

  2. opening one of the received test emails and using Firefox/Developer/Page Source nothing at all shows in relation to the sent 'actual message content', i.e. text of message doesn't show (but exists in received email) and no reference to an image url or failed url - just streams of script and CSS.

** in Outlook there is a tab 'message source' that again doesn't contain any readable text (encrypted I suppose?) or readable errors that I can discern - I can send this to you in a PM if you wish (unsure of any security issues in posting it in here?)

  1. I forwarded the received email in Outlook to Gmail and got the same result, i.e. no image appeared so confirming nothing in the html of the Outlook email pertaining to an image that Gmail could open that Outlook couldn't - suggesting it didn't send from admin? (I cannot send from admin direct to my gmail account because I am not a customer with gmail address in admin)

OK - my admin/configuration/Email_Options settings are PHP yes, and MIME HTML yes, so I assume that is correct - as previously indicated text is sending but not images although images are appearing in preview.

Food for thought - the emails are going through my hosts server before being relayed to my email client(s) - is it possible that the cause of this issue could be in that process? - if so what recommended (technical) wording would you use to say to the host to check the problem, if any other than what I have said in here?

I will ask you the same question I asked MC - can you send an image from your admin/tools/send_emails and have it received as it should be? just asking to try and verify that the send_emails program is actually designed to send html images?

cheers, Mike

27 Apr 2017, 7:58 AM
#14
drbyte avatar

drbyte

Sensei

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

Re: images not showing up in emails sent from admin

shags38:

I will ask you the same question I asked MC - can you send an image from your admin/tools/send_emails and have it received as it should be? just asking to try and verify that the send_emails program is actually designed to send html images?Yes.
Sending the following HTML message includes both the text and the image:

<p>There should be an image in this email ...</p>
<p><img alt="alt text here" src="http://zen-cart.net/images/3_small.jpg" style="width: 100px; height: 80px;" /></p>
<p>and then some more text</p>

shags38:

I am trying to generate a 'promo' email for distribution to customer base sectors
I use Mailchimp for sending promotional mail to subscribers. They're experts in that, so best to leave that stuff to them.

27 Apr 2017, 1:24 PM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: images not showing up in emails sent from admin

shags38:

Yes MC - updated same day it was posted. Would be interested to know if you can successfully send an email with an image from your store admin using admin/tools/send_email ?
cheers, Mike
So after setting my store to permit sending html emails, I sent a test message to myself (customer of the store) that included some text about it being a test message, the address to the image and a full img html that had been copied from the website but had added the prefix to the url such that it included the contents of HTTP_SERVER . DIR_WS_CATALOG before the remainder of the relative link.

This email came through but, all that was included was the message and the link, no image. Review of the email log showed as preview that the image was "present". I then realized that because the customer had started off in the store under the store setting of plain text only that the customer's setting for receiving email had to be changed to html.

Changed the customer's setting, then went back and sent another message (text prefix content was modified slightly so that I could specifically tell the difference between the two emails). This time the received email showed place holders for where the images were expected and my email client offered me a choice of downloading the images.

Upon download of the images, all was "well". Email appeared as expected with all of the default aspects, my new text, the link to the image, and the image itself.

From these results, my first thought is that the customer is not set to receive html emails as why the image doesn't come through. The next would be that there may be something over sanitizing the html portion of the email, after that is that outlook is out-right removing any "reference" to the html for the image such that even upon forwarding of the email it doesn't go contain that additional "code".

As to the sole use of outlook, unless your email is on a microsoft exchange server that doesn't allow some form of pop or other access, there should be no reason you can't attempt to access the email sent to that account from another email client. Even Gmail offers the ability to access email accounts outside of Gmail (provided the credentials are known).

27 Apr 2017, 10:15 PM
#16
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

mc12345678:

So after setting my store to permit sending html emails, I sent a test message to myself (customer of the store) that included some text about it being a test message, the address to the image and a full img html that had been copied from the website but had added the prefix to the url such that it included the contents of HTTP_SERVER . DIR_WS_CATALOG before the remainder of the relative link.

This email came through but, all that was included was the message and the link, no image. Review of the email log showed as preview that the image was "present". I then realized that because the customer had started off in the store under the store setting of plain text only that the customer's setting for receiving email had to be changed to html.

Changed the customer's setting, then went back and sent another message (text prefix content was modified slightly so that I could specifically tell the difference between the two emails). This time the received email showed place holders for where the images were expected and my email client offered me a choice of downloading the images.

Upon download of the images, all was "well". Email appeared as expected with all of the default aspects, my new text, the link to the image, and the image itself.

From these results, my first thought is that the customer is not set to receive html emails as why the image doesn't come through. The next would be that there may be something over sanitizing the html portion of the email, after that is that outlook is out-right removing any "reference" to the html for the image such that even upon forwarding of the email it doesn't go contain that additional "code".

As to the sole use of outlook, unless your email is on a microsoft exchange server that doesn't allow some form of pop or other access, there should be no reason you can't attempt to access the email sent to that account from another email client. Even Gmail offers the ability to access email accounts outside of Gmail (provided the credentials are known).

Hello MC - many thanks for doing the practical exercise to duplicate my issue, you deserve credit for the initiative. I went into admin/customers and changed my preference from 'text' to 'html' and that solved the issue. So again well done.

Small problem though - refer to screenshot - the image is inside a Zen Cart promo iFrame or template - how can this be obviated/removed from being part of the image?

cheers, Mike
[Attachment no longer available]

27 Apr 2017, 10:49 PM
#17
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

DrByte:

I use Mailchimp for sending promotional mail to subscribers. They're experts in that, so best to leave that stuff to them.

Hi Doc - you will have seen the post from MC which has solved the clinical problem of why the images were not appearing - which is no doubt the reason you and thousands of others are using Mail Chimp as a matter of have to - not because they are experts but because they use an exported mail list that does not have restrictions of 'text only' when sending the email. As much as I am happy that MC discovered the problem I must admit to being flabbergasted at why the customer registration form has 'text' only as default for email preference. How many consumers out there would even know what 'html' means? In the 21st Century emails from even your Doctor have html content - their logo at least. It is archaic. If a customer selects to receive the Newsletter and doesn't change the radio tab to html then all they are going to get is text - it would be the only newsletter on the internet that would be text only.

I don't even know why the customer is asked for a preference at all - I can only assume someone back in the day thought it was nice to do so as not to impose on a customer's privacy or some lame reason like that. If the decision of ZC management is that a preference question is to remain in the customer registration form then as a suggestion it would be smart to re-word the question to something that everyone can understand the meaning of like "when sending you emails would you prefer that images be included in the email yes/no with yes being default - if the customer doesn't want images in the emails then he/she will make that decision.

Or why bother at all because the customers are going to get promo emails/newsletters/ etc with images regardless of their preference because Mail Chimp is being used (by many) - so it is superfluous.

Sorry Doc, I do not mean to rant but as I said, I'm flabbergasted. Maybe consider updating the process?

cheers, Mike

28 Apr 2017, 3:25 AM
#18
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: images not showing up in emails sent from admin

Couple of things if I may. The "issue" of the "extra" image is in a way one reason I still use text only email, because guess what, don't have to spend the time to identify all of the various options, methods, and ways to "personalize" the email. As if there isn't enough to consider, do, and establish to personalize the site. That type stuff really should be addressed by/on another thread. Afterall, the issue of this one is that images don't appear. And now there are too many. :P

As to the default setting? That is something you as a store owner can change. For those that know the difference they have to question whether they want the "upstep" which personally, I choose to ignore images initially which actually is considered a security protection. Images can carry malicious information and basically anything important ought to be in text (think about those that can not see and depend on some form of text reader to know/learn about the content, or the data savers that don't need/want to download all the additional content).

I get the subtle aggravation of the default setting which means that you have to either prevent the possibility of switching from one to another, or always "code" for both to ensure that content is always accessible and understandable.

To put it even another way. The store/software is fully customizable. A store could be put up and "running" in a matter of an hour (this includes potential file transfer time and any associated initial setup), and voila payments can begin coming in. The myriad of other options and possibilities comes from first the suggested action of "try it yourself", but also from either already knowing what you want as the store default (some installers create a sort of ready-made SQL to kick things off), or searching out how to change things to what is desired through a book, this site, etc... or call it a natural state of progression/learning.

28 Apr 2017, 5:22 PM
#19
drbyte avatar

drbyte

Sensei

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

Re: images not showing up in emails sent from admin

shags38:

I must admit to being flabbergasted at why the customer registration form has 'text' only as default for email preference. How many consumers out there would even know what 'html' means? In the 21st Century emails from even your Doctor have html content - their logo at least. It is archaic. If a customer selects to receive the Newsletter and doesn't change the radio tab to html then all they are going to get is text - it would be the only newsletter on the internet that would be text only.

I don't even know why the customer is asked for a preference at all - I can only assume someone back in the day thought it was nice to do so as not to impose on a customer's privacy or some lame reason like that. If the decision of ZC management is that a preference question is to remain in the customer registration form then as a suggestion it would be smart to re-word the question to something that everyone can understand the meaning of like "when sending you emails would you prefer that images be included in the email yes/no with yes being default - if the customer doesn't want images in the emails then he/she will make that decision.

Or why bother at all because the customers are going to get promo emails/newsletters/ etc with images regardless of their preference because Mail Chimp is being used (by many) - so it is superfluous.

Sorry Doc, I do not mean to rant but as I said, I'm flabbergasted. Maybe consider updating the process?

cheers, Mike

Thanks for sharing your opinion.

I didn't respond because there's a LOT more involved here, and I really didn't want to go into explaining all the things I've learned the hard way over the years as it relates to reliably sending emails that get delivered and actually read. I'll share just a few here, just to confirm I'm not blowing smoke.

Even the likes of Constant Contact and Mailchimp etc have stated many times that attachments and malformed HTML are BAD practices in reaching customers. The most successful (email-based) marketing services strongly encourage emails to be text-only, when it comes to marketing.
And the services that provide transactional email also typically encourage text-only messaging.
That doesn't mean they completely discourage use of HTML in messages. On the contrary, they provide their own sophisticated tools that force you to use their "tested" markup ... again with the goal of not getting red-flagged and therefore undelivered, or worse, getting servers blacklisted.

Summary: if you're going to do marketing to your mailing list, use services that specialize in this feature. The email tool in Zen Cart is NOT designed to be used for mass marketing.

I'm sorry that a default feature that acts in the best interest of customers and storeowners for maximum deliverability ruffled your feathers by functioning differently than you originally expected. This whole discussion would be moot if we were just forcing our own preferences on customers without their having a say.
You can of course, as discussed above, change the default setting in order to correspond in the style that you prefer.

As far as "updating the process", first, you can change the preference yourself immediately. Second, the next major version of Zen Cart will probably be designed to leverage a 3rd-party service for sending these kinds of emails, again, distributing the task to services best suited for the responsibility.

28 Apr 2017, 5:57 PM
#20
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: images not showing up in emails sent from admin

shags38:

Hi Doc - you will have seen the post from MC which has solved the clinical problem of why the images were not appearing - which is no doubt the reason you and thousands of others are using Mail Chimp as a matter of have to - not because they are experts but because they use an exported mail list that does not have restrictions of 'text only' when sending the email. As much as I am happy that MC discovered the problem I must admit to being flabbergasted at why the customer registration form has 'text' only as default for email preference. How many consumers out there would even know what 'html' means? In the 21st Century emails from even your Doctor have html content - their logo at least. It is archaic. If a customer selects to receive the Newsletter and doesn't change the radio tab to html then all they are going to get is text - it would be the only newsletter on the internet that would be text only.

I don't even know why the customer is asked for a preference at all - I can only assume someone back in the day thought it was nice to do so as not to impose on a customer's privacy or some lame reason like that. If the decision of ZC management is that a preference question is to remain in the customer registration form then as a suggestion it would be smart to re-word the question to something that everyone can understand the meaning of like "when sending you emails would you prefer that images be included in the email yes/no with yes being default - if the customer doesn't want images in the emails then he/she will make that decision.

Or why bother at all because the customers are going to get promo emails/newsletters/ etc with images regardless of their preference because Mail Chimp is being used (by many) - so it is superfluous.

Sorry Doc, I do not mean to rant but as I said, I'm flabbergasted. Maybe consider updating the process?

cheers, Mike

You really ought to tone things down and think a bit before you post. Realize there is a "Big Picture" going on with Zen Cart, and most any eCommerce script, in that there are certain Laws by Country that have to be met/followed and certain restrictions by Hosting companies. And MC did not "solve" any problem except for the one where you did know the options you have available to you in Zen Cart and they were pointed out to you. Much the same as DrByte has pointed out more options available to you.

Using a 3rd party service for sending eMails makes sense in a lot of ways. An example is the first time someone sends out 20,000 or more eMails in one go, regardless of Text or HTML format, they could find that their Hosting account is Suspended and all eMails returned. Hosting accounts are not designed nor intended for Mass Mailings of large numbers. And why do you imagine signing up for the Newsletter is optional? Did you also know sending HTML eMail without Receiver's consent is against the law in some places?

Are you familiar with the CAN-SPAM Act in the US or in Canada or in (pick a country, any country).