I have installed extension SMTP from Mageplaza https://www.mageplaza.com/magento-2-smtp/

In the "logs" panel I should have all messages sent as in the screenshot below. enter image description here

But in my magento I have error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'b2b_style.mageplaza_smtp_log' doesn't exist, query was: SELECT COUNT(*) FROM `mageplaza_smtp_log` AS `main_table`

enter image description here

Anyone know how to solve it?

  • setup:upgrade + cache:clean ? Commented Jan 26, 2018 at 10:18
  • There is not a lot to go on. Did your bin/magento setup:upgrade complete without errors? Commented Oct 11, 2023 at 6:53

3 Answers 3


This issue might be because of something happens wrong while installing this extension. Or setup script has something wrong. So Open table setup_resource and find module for Mageplaza_Smtp, delete that row and try running commands:

PHP bin/magento setup:upgrade

It will create table. Please put die Inside setup script to debug.


Do setup:upgrade and cache clean / flush.
If that wont work check version of module in module and check module version in database (table setup_resource and look for Mageplaza_Smtp module).
If version is the same and mageplaza_smtp_log table is not exist in DB, then try to uninstall module (using Uninstall Script).

Otherwise try to recognize where exactly in Setup/Install.php or Upgrade.php file in module is script creating this table and revert module version id DB to this version - then use again setup:upgrade and clear cache or just run script creating table manually.


You might want to try

composer update
bin/magento setup:upgrade
bin/magento cache:clean
  • You do not do a composer update on a Magento shop unless you mean to perform a magento update. If you think your composer.lock may be out of sinc with you composer.json you can do a composer update --lock Commented Oct 11, 2023 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.