magento-2-smtp
magento-2-smtp copied to clipboard
Emails not being sent with Mageplaza SMTP with Cron actions
Preconditions (*)
- Magento 2.4.2-p1
- I'll explain the issue with the specific problem we're having: email product stock alerts are not being sent with Mageplaza SMTP modules. Other shop emails are sent correctly.
Steps to reproduce (*)
- Enable product alert stock in backoffice (Stores » Configuration » Catalog » Product Alerts)
- Set a product stock to 0 and subscribe to it on the frontend
- Set the product stock to 1 and force the catalog_product_alert cron to be executed (either from Mageplaza Cron module or just wait for the next day)
Expected result (*)
- Stock Alert table should be updated
- Stock alert email should be sent and Mageplaza SMTP logs should display the email
Actual result (*)
- Stock Alert table should be updated (this is correct, and it indicates that the logic of the module seems to work fine)
- Stock alert email is not sent (at least it is not sent with Mageplaza SMTP module). The email is not in the email logs.
Notes
- If I use n98-magerun2 to execute the cron task, it works fine (emails are sent and stored with Mageplaza)
- All data in database is correct, it seems that everything is executed as expected: but there is no trace of any email sent
- It seems to me like if emails sent from Cron tasks are avoiding Mageplaza SMPT module
Hi,
For emails sent from Cron tasks, it is processed in core, the Smtp module is not involved in processing, so it does not support sending emails from Cron tasks.
Hope my answer will be of help to you. Thank you!
Thanks for clarifying this, Huy.
Is there a way to implement this? Any plans of doing so?
I can't customize the Smtp module to solve this problem for you. We have no plans for this at the moment.
Thank you!
Thanks, Huy. No problem, :) If I have the time, I'll check it myself.
Should we keep this ticket open in case someone solves it in the future?
If that's what you want, I'll keep this ticket open until someone solves your problem. Thank you!