Jump to content
thirty bees forum
  • 0

Solved: Order Emails No Longer Sent 1.1.0-1.1.x


Rhapsody

Question

I'm baffled and need some tips on how to troubleshoot this.  I have one shop that I updated from 1.1.0 stable to 1.1.x bleeding edge.  I uses a modified community theme.  Everything was working fine before the upgrade.  I no longer get emails sent via the mailalerts module to the shop admin or the standard order emails to the customer.  I tried rolling back to 1.1.0 and it did not fix it.  here are some steps I've taken:

1.  Looked at the server error logs - nothing in there

2. Uninstalled and reinstalled the mailalerts module to reset the hooks

3. Checked to make sure the email templates are there for en (default language) both in the modules/mailalerts/mails/en directory & mails/en directory

4.  Checked to make sure the email templates are there for en (default language) in the themes/my-modded-theme/ both in the modules/mailalerts/mails/en directory & mails/en directory

5. I am able to send the test message ok

6. If I open an order in the BO and click the resend email button, the email is sent just fine

Any ideas on what I can do to further troubleshoot this?

Edit: I just deleted the class_index.php file and will see what happens when it regenerates. 

Edited by Rhapsody
Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Problem solved! 

It is something with the PHP mailer.  I have changed outgoing mail to use SMTP and the problem is solved.  I can't explain why test messages were sent ok using the PHP mailer but actual shop messages are not. I have been using the PHP mailer successfully up until now.

ps - a big thank you and Happy New Year to all who provided troubleshooting suggestions.

Edited by Rhapsody
Link to comment
Share on other sites

  • 0
8 minutes ago, the.rampage.rado said:

Are they really not sent or they end up in the junk folder?

It happens to me from time to time and I think it's because of the information in the templates, some filter somewhere think these emails are spam but let's the test emails through (so I don't believe you have bad rep problem or you are blacklisted).

Nothing in spam - The test message get through just fine

 

5 minutes ago, yaniv14 said:

check the mail logs in the backoffice, this will tell you if the mailalrets module did or did not send the mail to you.

p.s. did you double check that your email is really set in the mail alerts configuration?

The mails do not show other than the ones I manually triggered.

I checked the mailalerts setting and compared side-by-side to another shop I have that is working.  Other than the email address, the settings are the same.

Link to comment
Share on other sites

  • 0
57 minutes ago, yaniv14 said:

Do you see the mailalerts module hooked into actionValidateOrder?

Also try to disable any overrides (just for testing).

Confirmed it is hooked.  Disabled all overrides, cleared cache, deleted class_index.php and made a test order with no success. 😟 

Link to comment
Share on other sites

  • 0
On 1/3/2021 at 1:18 AM, yaniv14 said:

try to put it first in the actionValidateOrder hook. and also can you confirm that other modules on the same hook does trigger when a new order placed?

@yaniv14 - It is the only module with the actionValidateOrder hook.  I also checked the other shop that is working with only the same single hook.

Link to comment
Share on other sites

  • 0
31 minutes ago, Rhapsody said:

I assume it does since it works on the other shop that shows the same hook.

Major part of bugfixing is to check such assumptions. Are they actually true?

One way of finding out is to add some debug code into the (assumed) triggered method. For example this:

file_put_contents(_PS_CACHE_DIR_.'/debug', __METHOD__.' '.__LINE__."\n", FILE_APPEND);

This line of code should create a file 'debug' in the cache directory on execution. If the file appears (or receives additional lines), the hook gets triggered; if not, it doesn't get triggered.

Link to comment
Share on other sites

  • 0
2 hours ago, yaniv14 said:

you have both files in your mails folder?

/mails/en/new_order.html

/mails/en/new_order.txt

Verified they are in the directories:

modules/mailalerts/mails/en

themes/mytheme/modules/mailalerts/mails/en

2 hours ago, yaniv14 said:

btw: does "new order" is chcked in the module configuration?

yes - confirmed that new order is checked

2 hours ago, Traumflug said:

Major part of bugfixing is to check such assumptions. Are they actually true?

One way of finding out is to add some debug code into the (assumed) triggered method. For example this:

file_put_contents(_PS_CACHE_DIR_.'/debug', __METHOD__.' '.__LINE__."\n", FILE_APPEND);

This line of code should create a file 'debug' in the cache directory on execution. If the file appears (or receives additional lines), the hook gets triggered; if not, it doesn't get triggered.

Thanks for this tip.  I will try this and report back later.

Edited by Rhapsody
Link to comment
Share on other sites

  • 0

Further troubleshooting I just had a customer report they can't reset their password because when they click the retrieve password button the following error is displayed:

There is 1 error

  1. An error occurred while sending the email.

It looks like I need to find out what is happening with all outgoing emails. The test messages using PHP mailer works fine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...