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

Hi,

I tried to send to 5 contacts and it works.
when I want to send to 6000 contacts it doesn’t work.

the email stats show that all emails have been sent.

but my smtp dashboard doesn’t sent. (only showing 15. the 5 contacts that I tested and some campaign emails)

what’s going on here?

Sorry, we have to go back to Question Nr.2.:
2. do you use Queue for email sending?

No… I send immediately

Sending over 200 emails without a queue creates big pressure on your server and might time out if your server AND the SMTP is not capable of managing the whole send.

Possible other problem can be that your SMTP provider gets the 5000 emails at once (since there is no queue) and shuts down the comlink - so you are punished for sending too fast.

Did you leave the broadcast open and saw the progress bar slowly moving towards 100%?

I suggest to switch to a queue. (Add the crons needed for that. You can look for my youtube tutorial about how email sending works, gives you some tips.)

I used to send with queue. I thought if I run mautic on a VPS, I could send email immediately. :smiley:
thank you… You rock!