If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Email issues with contact us and orders, restore makes it work again temporarily

Email issues with contact us and orders, restore makes it work again temporarily

Started by styrak on 5 Sep 2022, 12:22 PM · Views: 991

Results 1 to 8 of 8
5 Sep 2022, 12:22 PM
#1
styrak avatar

styrak

New Zenner

Join Date:
Jul 2019
Posts:
7
Plugin Contributions:
0

Post #1 by styrak

Using 1.5.6a

Having issues with email. First started a while ago, then did a restore and was working again. A week ago it started happening again, and a restore back a week or two will not fix it.

Not receiving emails from contact us page, and cannot send order emails from Orders section.
If I select PHP I get "ERROR: Failed sending email to: "my name" with subject: "Order Update #163" Could not instantiate mail function.
If I select sendmail I get "ERROR: Failed sending email to: "my name" with subject: "Order Update #163" Could not execute: /usr/sbin/sendmail -t -i
If I select SMTPauth (which has the proper fields filled out), it just hangs and I get a 500 internal server timeout white page.

My questions are, why would a restore fix it, why did a restore not fix it again, and why would I need to restore at all? What's going on?!

6 Sep 2022, 3:32 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,908
Plugin Contributions:
23

Post #2 by dbltoe

It's best to give us all you've got on the logs using the # above to enclose the info. Makes helping a lot easier.

You have a version that needs to be updated https://www.zen-cart.com/showthread.php?225676-Security-Patch-for-all-versions-prior-to-v156c

There are also a LOT of improvements in 1.5.7d.

Meanwhile, head on over to https://docs.zen-cart.com/user/email/emails_not_received/ and see if thagt doesn't help.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Sep 2022, 8:17 AM
#3
styrak avatar

styrak

New Zenner

Join Date:
Jul 2019
Posts:
7
Plugin Contributions:
0

Post #3 by styrak

What logs?

I've read the email troubleshooting threads but it doesn't really help me much.

6 Sep 2022, 1:24 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

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

Post #4 by mc12345678

Styrak:

What logs?

I've read the email troubleshooting threads but it doesn't really help me much.

In the root of your store, you should have a directory called logs. It is in the same directory that includes folders such as images, includes, YOUR_SECRET_ADMIN, email, etc.

Once in the logs directory, tackle the most recent log(s) first. Understand though that if the logs filename includes "adm" then it will have your secret admin directory name in it. When/if posting contents from that file, be sure to obscure the admin folder name.

If no files exist in this directory, there could be any of a couple of issues, from permissions not being correct, modifications to the error logging handler, too many cooks for you ftp program to see any items, etc... a default install has at least a few files in this directory, so if contents cannot be found be sure to explain what has been found and help should follow.

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

6 Sep 2022, 3:45 PM
#5
styrak avatar

styrak

New Zenner

Join Date:
Jul 2019
Posts:
7
Plugin Contributions:
0

Post #5 by styrak

What keywords am I looking for in these logs? "mail"? Or something else.

Each one is only about 10kB and a few hundred lines.

6 Sep 2022, 3:59 PM
#6
styrak avatar

styrak

New Zenner

Join Date:
Jul 2019
Posts:
7
Plugin Contributions:
0

Post #6 by styrak

I did find this when I switched it to PHP

[06-Sep-2022 15:55:41 UTC] Request URI: //orders.php?page=1&oID=163&action=update_order, IP address: *********
#1 trigger_error() called at [/var/www/vhosts/
.ca/httpdocs/includes/functions/functions_email.php:377]
#2 zen_mail() called at [/var/www/vhosts/.ca/httpdocs/includes/functions/functions_osh_update.php:141]
#3 zen_update_orders_history() called at [/var/www/vhosts/********.ca/httpdocs/
/orders.php:158]
--> PHP Notice: Email Error: Could not instantiate mail function.<br /> in /var/www/vhosts/*********.ca/httpdocs/includes/functions/functions_email.php on line 377.

7 Sep 2022, 12:07 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

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

Post #7 by mc12345678

Styrak:

I did find this when I switched it to PHP

[06-Sep-2022 15:55:41 UTC] Request URI: //orders.php?page=1&oID=163&action=update_order, IP address: *********
#1 trigger_error() called at [/var/www/vhosts/
.ca/httpdocs/includes/functions/functions_email.php:377]
#2 zen_mail() called at [/var/www/vhosts/.ca/httpdocs/includes/functions/functions_osh_update.php:141]
#3 zen_update_orders_history() called at [/var/www/vhosts/********.ca/httpdocs/
/orders.php:158]
--> PHP Notice: Email Error: Could not instantiate mail function.<br /> in /var/www/vhosts/*********.ca/httpdocs/includes/functions/functions_email.php on line 377.

What changes have been made to includes/functions/functions_osh_update.php to change the content of line 141 from whatever it is to what is found at: https://github.com/zencart/zencart/blob/742b837868a2b128df96b6635c413c8187972679/includes/functions/functions_osh_update.php#L141 ?

The line referenced above is an assignment of a variable and does not appear to be something that is expected to invoke a call to the email process.

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

19 Sep 2022, 3:27 AM
#8
styrak avatar

styrak

New Zenner

Join Date:
Jul 2019
Posts:
7
Plugin Contributions:
0

Post #8 by styrak

And now it's just suddenly working properly again. Frustrating but good at the same time.