Mautic Community Forums

Mautic doesn't send emails to smtp API

Your software
My Mautic version is:3.1.0
My PHP version is:7.3
My Database type and version is:

Your problem
My problem is:
mautic doesn’t send emails to smtp API. The stats show that emails have been sent but the smtp doesn’t receive anything. It works well 2 days ago. and to day it something’s wrong

These errors are showing in the log:

[2021-07-18 00:31:06] mautic.ERROR: CAMPAIGN: An exception occurred while executing ‘REPLACE INTO mau57_campaign_lead_event_failed_log( log_id, date_added, reason) SELECT id, :dateAdded as date_added, :message as reason from mau57_campaign_lead_event_log WHERE is_scheduled = 1 AND lead_id = :contactId AND campaign_id = :campaignId AND rotation = :rotation’: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘:dateAdded as date_added, :message as reason from mau57_campaign_lead_event_l…’ at line 2

Steps I have tried to fix the problem: domain/s/update/schema
and it shows this notif:An error occurred while updating the database. Check log for more details.
[2021-07-19 06:49:44] mautic.NOTICE: Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing ‘ALTER TABLE mau57_email_stats ADD generated_sent_date DATE AS (CONCAT(YEAR(date_sent), “-”, LPAD(MONTH(date_sent), 2, “0”), “-”, LPAD(DAY(date_sent), 2, “0”))) COMMENT ‘(DC2Type:generated)’; ALTER TABLE mau57_email_stats ADD INDEX mau57_generated_sent_date_email_id(generated_sent_date, email_id)’: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE mau57_email_stats ADD INDEX mau57_generated_sent_date_email_id(…’ at line 2 (uncaught exception) at /home/wpmmyid/engli.id/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command doctrine:migrations:migrate

[2021-07-19 06:49:44] mautic.WARNING: Command doctrine:migrations:migrate exited with status code 1

[2021-07-19 06:49:44] mautic.ERROR: [UPGRADE ERROR] Exit code 1; ++ adding generated column generated_sent_date → ALTER TABLE mau57_email_stats ADD generated_sent_date DATE AS (CONCAT(YEAR(date_sent), “-”, LPAD(MONTH(date_sent), 2, “0”), “-”, LPAD(DAY(date_sent), 2, “0”))) COMMENT ‘(DC2Type:generated)’; ALTER TABLE mau57_email_stats ADD INDEX mau57_generated_sent_date_email_id(generated_sent_date, email_id) \ In AbstractMySQLDriver.php line 79: \ An exception occurred while executing ‘ALTER TABLE mau57_email_stats ADD ge nerated_sent_date DATE AS (CONCAT(YEAR(date_sent), “-”, LPAD(MONTH(date_sen t), 2, “0”), “-”, LPAD(DAY(date_sent), 2, “0”))) COMMENT ‘(DC2Type:generate d)’; ALTER TABLE mau57_email_stats ADD INDEX mau57_generated_sent_d ate_email_id(generated_sent_date, email_id)’: \ You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE m au57_email_stats ADD INDEX mau57_generated_sent_date_email_id(…’ at lin e 2 \ In MysqliStatement.php line 86: \ You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE m au57_email_stats ADD INDEX mau57_generated_sent_date_email_id(…’ at lin e 2 \ doctrine:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–all-or-nothing [ALL-OR-NOTHING]] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] [] \
this’s the log

Hi,

  1. can you try to send an email with a very small content to test with?
  2. do you use Queue for email sending?

Thx
Joey