Mautic don`t send emails

Hello Igor !
This is part of the learning process, I made the same mistake as you did. I would suggest to go like this:

Understand how much you can send every minute. This will be the basis of your sending speed.

  1. Fill up your emails in the spool folder. Once you ready count the files:
    ls | wc
    This will give you the number of files.
  2. Launch send email command in your command line:
    php /var/www/html/mautic-s2g/bin/console mautic:emails:send --time-limit=50
    This will send emails for 50 seconds
  3. Check how many emails you’ve sent by counting the files again:
    ls | wc
    Let’s say this is 200 emails. So now you know that your sending speed is 200 / min on each thread.

2. Adjust desired speed. Your SMTP might limit your speed based on your reputation. Make sure you are not trying to send faster. Also: you need proper domain/IP reputation to send fast. If we assume, that is all good you can start scaling.

  1. Let’s assume your speed is the above identified 200/50 sec. You want to leave that 10 seconds leftover from the 1 minute intevall for the script to run. Maybe it’s better to work with 45 seconds, that depends on your server.

  2. If you need to send 650.000 emails in 2 hours, then you need to have a pretty strong infrastucture, with IP rotation and superb domain reputation. Let’s assume you have it. So 650.000 / 60 / 2 = 5416 / min, which ends up in 27 threads.

  3. You can add your 27 threads with the locking mechanism (don’t bypass plz) and sent the time to:
    php /var/www/html/mautic-s2g/bin/console mautic:emails:send --lock-name=envio-mv-40 --time-limit=50
    Since the script only runs for 50 sec, you can relaunch it every minute.

Caution:
Make sure your feedback loop is working and people can unsubscribe. Don’t send unsolicited email.

I have no idea if your server AND your mysql settings AND your SMTP can handle it, that’s another discussion.

It’s always smarter to start slow and scale by watching the performance.

Best of luck!