Forums / Addon Admin Tools / Email Archive Manager

Email Archive Manager

Views: 65,744

Results 161 to 180 of 209
19 Nov 2016, 12:15 PM
#161
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Email Archive Manager

s_mack:

I'm having some weirdness with this contrib too... is it simply not compatible with 1.5.4?

When I tried resending an email, it throws these errors (which means nothing to me):

22-Nov-2015 20:00:15 MST] PHP Warning: Illegal string offset 'EMAIL_TO_NAME' in /home/smartiep/public_html/shop/includes/functions/functions_email.php on line 99
[22-Nov-2015 20:00:15 MST] PHP Warning: Illegal string offset 'EMAIL_TO_ADDRESS' in /home/smartiep/public_html/shop/includes/functions/functions_email.php on line 100
[22-Nov-2015 20:00:15 MST] PHP Warning: Illegal string offset 'EMAIL_SUBJECT' in /home/smartiep/public_html/shop/includes/functions/functions_email.php on line 101
[22-Nov-2015 20:00:15 MST] PHP Warning: Illegal string offset 'EMAIL_FROM_NAME' in /home/smartiep/public_html/shop/includes/functions/functions_email.php on line 102
[22-Nov-2015 20:00:15 MST] PHP Warning: Illegal string offset 'EMAIL_FROM_ADDRESS' in /home/smartiep/public_html/shop/includes/functions/functions_email.php on line 103

> 
> I tried looking up that vague "illegal string offset" error and it typically has something to do with treating a string like an array, but when I look at those lines there's no array magic going on at all?!?
> 
> 
> This isn't my only issue.  Previewing in HTML shows me nothing.  I *must* preview in text to see anything.  My admin is set to HTML, if that matters.  
> 
> I suspect the two above problems are related since the error-throwing code chunk has something to do with the html block for sending an email.

Did you ever fix this problem?

I have the same problem and same log entries with V155b and email_archive_manager_1-7b_zc1.5 when resending HTML emails.

I receive this (only a few lines shown) when I try to resend the confirmation email (similar problem with resend of "password forgotten" email and probably others);
> $EMAIL_SUBJECT
> ihtml_ _head_ _meta http-equiv="Content-Type" content="text/html; charset=utf-8" /_ _base href="http://localhost:8080/zencart155b/catalog/" /_ _style type="text/css"_ body {background-color:#ffffff; color:#000000; font-family:Verdana, Arial, Helvetica, sans-serif; text-align:center;} a:link {color:#000099;} a:hover {background-color:#eeeecc; color:#0066cc;} a:visited {color:#0066cc;} .holder {background-color:#f9f9f9; border:1px solid #9a9a9a; font-size:9px; text-align:left; width:550px;} .header {font-size:10px; padding:0px; width:550px;} .content {font-size:14px; color:#000099;..........

When I resend an email that was created using the Zen Cart tool "send email" it is different but still not 100% correct; the first part is corrupt (see image) then it continues as usual with "dear sir" and what follows is as normal.  As you see the logos are not shown, this is OK I have remote content blocked.
19 Nov 2016, 1:25 PM
#162
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Email Archive Manager

Forgot to say that when I want to resend an email I first see a preview with a question "do I really want to send", this preview is OK, it is in text format not HTML.

19 Nov 2016, 1:37 PM
#163
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Email Archive Manager

Just noticed the very last part (disclaimer) of the incorrectly shown HTML email is shown as normal; I mean this

</div> <div class="disclaimer"> <div class="disclaimer1">$EMAIL_DISCLAIMER</div> <div class="disclaimer2">$EMAIL_SPAM_DISCLAIMER</div> </div>
23 Nov 2016, 5:28 AM
#164
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Re: Email Archive Manager

A fix for the warnings this module spits out:

diff -b email_archive_manager.php ~/Desktop/email_archive_manager_1-7b_zc1.5/admin/email_archive_manager.php 
33d32
<     if($email->email_html == 'HTML disabled in admin') $email->email_html = array();

Hope it helps.

DentalPlanet Designed/Administrated by Falls Geek

15 Feb 2017, 10:36 AM
#165
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

Given that the HTML is defanged before storage, does it make sense anymore to have a VIEW HTML button? In fact, should we even bother storing the HTML anymore?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

24 Feb 2017, 3:52 PM
#166
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

Email Archive Manager users: I have been given clearance by Dr. Byte to proceed on this change. I'll get it done in the next couple of weeks.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

25 Feb 2017, 5:42 AM
#167
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Email Archive Manager

swguy:

Given that the HTML is defanged before storage, does it make sense anymore to have a VIEW HTML button? In fact, should we even bother storing the HTML anymore?

Just came across this... but I didn't know this wasn't suppose to work!! I think I tweet the replacement code a bit some time back, but it works for me in viewing the html format that was sent.. Works good to view the sent email after modifying using the common email styling mod too.

True... we can use a WYSIWYG editor for creating or editing the html templates and send one to ourself, but when you get a complaint that the customer didn't get something, how else do you confirmed it wasn't an error in the email or your system!

Dave
Always forward thinking... Lost my mind!

25 Feb 2017, 12:00 PM
#168
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

The plain text email is still preserved.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

25 Feb 2017, 12:53 PM
#169
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Email Archive Manager

swguy:

The plain text email is still preserved.
Would it be the plain text email or the html email with the html tags removed? Ideally they should have the same content, but not always so...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

26 Feb 2017, 8:19 PM
#170
drbyte avatar

drbyte

Sensei

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

Re: Email Archive Manager

swguy:

Email Archive Manager users: I have been given clearance by Dr. Byte to proceed on this change. I'll get it done in the next couple of weeks.

Let me clarify my perspective:
a) I haven't used this module in several years. I wasn't aware that anything in it was "broken".
b) If storage and viewing of HTML messages is entirely broken, then I'm not opposed to removing the feature for re-viewing stored HTML messages. If the content has been "defanged" as scott stated, then there's no point in viewing raw altered html.

c) But if there are certain cases where the HTML re-view does indeed work, then let's not pull the trigger on removing the feature if it's still in use.

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

26 Feb 2017, 11:00 PM
#171
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

Instead of removing it, the following fix might work:

The admin side can stores html in some other tables (e.g. product description), and the reason is, the admin side zen_db_prepare_input does NOT include a zen_sanitize_string.

If we added an HTML safe zen_db_prepare_input to catalog side, and used that when preparing $email_html in zen_mail_archive_write, it would fix this problem.

I am just uncertain if it would introduce a security issue. I suspect not, but I am not certain.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

27 Feb 2017, 5:33 AM
#172
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Email Archive Manager

If the forms within our sites are sanitizing input from users, shouldn't that be safe to store/read? Email created within admin should be safe I would hope.

This walk has made me notice my email templates are antiquated and in desperate need for a responsive update. Something else to work on..

I modified some of the following section of code to make the view html button work for me.. I'm sure this will change as I modify my templates.

     if ($action=='prev_html') {
        $html_content = $this_email->fields['email_html'];
        $html_content = str_replace('_html_','<html>',$html_content);
        $html_content = str_replace('_/html_','</html>',$html_content);
        $html_content = str_replace('_head_','<head>',$html_content);
        $html_content = str_replace('_/head_','</head>',$html_content);
        $html_content = str_replace('_meta ','<meta ',$html_content);
        $html_content = str_replace('_base','<base',$html_content);
        $html_content = str_replace('_/style_','</style>',$html_content);
        $html_content = str_replace('_style','<style',$html_content);
        $html_content = str_replace('_body ','<body ',$html_content);
        $html_content = str_replace('_/body_','</body> ',$html_content);
        $html_content = str_replace('/_','/>',$html_content);
        $html_content = str_replace('_table_','<table>',$html_content);
        $html_content = str_replace('_table ','<table ',$html_content);
        $html_content = str_replace('_/table','</table',$html_content);
        $html_content = str_replace(array('_tr_','_tr>'),'<tr>',$html_content);
        $html_content = str_replace(array('_/tr_','_/tr>'),'</tr>',$html_content);
        $html_content = str_replace(array('_td_','<td_'),'<td>',$html_content);
        $html_content = str_replace('_td ','<td ',$html_content);
        $html_content = str_replace(array('_/td_','_/td>','</td_'),'</td>',$html_content);
        $html_content = str_replace('"_','">',$html_content);
        $html_content = str_replace('_ ','> ',$html_content);
        $html_content = str_replace('_li>','<li>',$html_content);
        $html_content = str_replace('_div ','<div ',$html_content);
        $html_content = str_replace('_/div_','</div>',$html_content);
        $html_content = str_replace('_/div','</div',$html_content);
        $html_content = str_replace('_strong_','<strong>',$html_content);
        $html_content = str_replace('_/strong_','</strong>',$html_content);
        $html_content = str_replace('strong_','strong>',$html_content);
        $html_content = str_replace('_/strong','</strong',$html_content);
        $html_content = str_replace('_!','<!',$html_content);
        $html_content = str_replace('--_','-->',$html_content);
        $html_content = str_replace(array('_br_','_br /_','_br />'),'<br />',$html_content);
        $html_content = str_replace('em_','em>',$html_content);
        $html_content = str_replace('_/em','</em',$html_content);
        $html_content = str_replace('_img ','<img ',$html_content);
        $html_content = str_replace('_a href','<a href',$html_content);
        $html_content = str_replace(array('_/a_','_/a>'),'</a>',$html_content);
        $html_content = str_replace('"_','">',$html_content);
        $html_content = str_replace('_nobr','<nobr',$html_content);
        $html_content = str_replace(';nbsp;',' ',$html_content);
        $html_content = str_replace('&','&',$html_content);
        $html_content = str_replace('&amp&','&&',$html_content);
        $html_content = str_replace('& ',' ',$html_content);
        $html_content = str_replace('"','"',$html_content);
      }

Dave
Always forward thinking... Lost my mind!

27 Feb 2017, 1:05 PM
#173
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,111
Plugin Contributions:
56

Re: Email Archive Manager

davewest:

... This walk has made me notice my email templates are antiquated and in desperate need for a responsive update. Something else to work on..
Just a note that Zen Cart 1.5.5 has incorporated the Common Email Styling plugin that provides those responsive email templates.

27 Feb 2017, 2:41 PM
#174
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Re: Email Archive Manager

Just wanted to chime my two cents. I'm actually sitting on an upgrade to upgrade to HTML email on my site because of this plugin and how zen cart stores HTML emails.

I was going to look into re-coding zen cart to actually store the emails properly, rather then go live without HTML previews. Still haven't gotten round to it though.

DentalPlanet Designed/Administrated by Falls Geek

27 Feb 2017, 3:38 PM
#175
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Email Archive Manager

lat9:

Just a note that Zen Cart 1.5.5 has incorporated the Common Email Styling plugin that provides those responsive email templates.

I notice that.. but the layout needs work. Currently it's just a html version of the text. With html format, you can run a fine line between useful and spam.. I like how Amaz0n did their layout, while some others are in the spam side.

But that's another subject...

If you send yourself a copy of everything your shop sends out, than is storing email really needed? It's nice to have that switch, but if it creates a problem by admin going to the spam side.. than maybe we shouldn't store them.

Maybe the whole archiving table and all should be a mod and not built into ZC or was that the patch you was suggesting @swguy

Dave
Always forward thinking... Lost my mind!

27 Jul 2017, 10:52 AM
#176
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

Updated the contribution to add notes about my fix for catalog side HTML emails.
Also changed the display order of To and From fields to match most email programs, which put From first.
Also changed subject display so that ellipsis would only be shown if the subject was actually trimmed.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

8 Aug 2017, 7:28 PM
#177
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

There was an error in the instructions I added to the module's readme file - I just made a fix to provide better instructions.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Feb 2018, 8:16 AM
#178
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Email Archive Manager

New Version - Email Archive Manager 1.8b for 1.55f
I've submitted an update that corrects an error in the admin extra_datafiles define that prevented admin profile restrictions from working correctly.

Tested and working on 1.55e & 1.55f.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

23 Aug 2018, 12:04 PM
#179
bottyz avatar

bottyz

New Zenner

Join Date:
Mar 2010
Location:
Nottingham UK
Posts:
90
Plugin Contributions:
0

Re: Email Archive Manager

Hi all,

I've installed this mod and been having issues with it. I'm on 1.5.5a and using the latest copy downloaded from this site.

Once installed the mod causes an internal server 500 error when zen cart is sending the email, so an email is never received. The debug logs look like this:

[22-Aug-2018 15:58:17 Europe/London] PHP Fatal error:  Uncaught Error: Call to undefined function zen_db_prepare_input_html_safe() in /public_html/shop/includes/functions/functions_email.php:405
Stack trace:
#0 /public_html/shop/includes/functions/functions_email.php(369): zen_mail_archive_write('Joe Bloggs', '[email protected]', 'Example Email...', '[email protected]', 'Order Confirmat...', '<html>\n <head>\n...', 'Order Confirmat...', 'checkout', '')
#1 /public_html/shop/includes/classes/order.php(1086): zen_mail('Joe Bloggs', '[email protected]', 'Order Confirmat...', 'Order Confirmat...', 'Company...', 'enquiries@example...', Array, 'checkout', Array)
#2 /public_html/shop/includes/modules/checkout_process.php(96): order->send_order_email(4441, 2)
#3 /public_html/shop/includes/modules/pages/checkout_process/header_php.php(14): require('/...')
#4 /public_html/shop/index.php(36): require('/...')
#5 {main}
  thrown in /public_html/shop/includes/functions/functions_email.php on line 405

What I've noticed is that the replacement 'functions_email.php' file in the module's installation folder includes a reference to a function that doesn't exist. 'zen_db_prepare_input_html_safe'

Line 405:

$email_html = (EMAIL_USE_HTML=='true') ? [B]zen_db_prepare_input_html_safe[/B]($email_html) : zen_db_prepare_input('HTML disabled in admin');

In the original functions_email file, the function is referred to as zen_db_prepare_input_html.

Is this correct? Would it affect anything adversely if I amended that line to the old function name? Or is there something wrong with my setup and that the _safe function should exist?

Any pointers would be appreciated!

23 Aug 2018, 12:09 PM
#180
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Email Archive Manager

You didn't install ./includes/functions/functions_email.php from the mod. This file includes the function zen_db_prepare_input_html_safe.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.