Emails are not sending but test email goes fine

Hello Team,

I am using 6.0.6 version of Mautic. Installed via Coolify and Docker compose.

I have added my AWS SES SMTP and test email goes fine. But when I send a campaign or even send a custom email to specific contact it does not get sent.

I checked my server and port 587 outbound is allowed on it.

Best,
Pratik

Hi, you should see errors in the logs.

There are no errors in the logs. Not for Cronjob nor for normal Mautic Web. Also I get this log in Cron for Segment building -

In ContactSegmentQueryBuilder.php line 267:
2025-11-14T05:15:01.423333534Z
2025-11-14T05:15:01.423337944Z Circular reference detected.
2025-11-14T05:15:01.423342154Z
2025-11-14T05:15:01.423346034Z
2025-11-14T05:15:01.423505863Z mautic:segments:update [-b|–batch-limit [BATCH-LIMIT]] [-m|–max-contacts [MAX-CONTACTS]] [-i|–list-id [LIST-ID]] [-tm|–timing [TIMING]] [-d|–exclude [EXCLUDE]] [–bypass-locking] [-t|–timeout TIMEOUT] [-x|–lock_mode LOCK_MODE] [-f|–force]

In mautic web app logs I get this -

[2025-11-14T05:45:02.828824+00:00] mautic.ERROR: Mautic\LeadBundle\Segment\Exception\SegmentQueryException: Circular reference detected. (uncaught exception) at /var/www/html/docroot/app/bundles/LeadBundle/Segment/Query/ContactSegmentQueryBuilder.php line 267 while running console command `mautic:segments:update` [stack trace] #0 /var/www/html/docroot/app/bundles/LeadBundle/Segment/Query/ContactSegmentQueryBuilder.php(65): Mautic\LeadBundle\Segment\Query\ContactSegmentQueryBuilder->getResolutionPlan(5) #1 /var/www/html/docroot/app/bundles/LeadBundle/Segment/ContactSegmentService.php(200): Mautic\LeadBundle\Segment\Query\ContactSegmentQueryBuilder->assembleContactsSegmentQueryBuilder(5, Object(Mautic\LeadBundle\Segment\ContactSegmentFilters)) #2 /var/www/html/docroot/app/bundles/LeadBundle/Segment/ContactSegmentService.php(42): Mautic\LeadBundle\Segment\ContactSegmentService->getNewSegmentContactsQuery(Object(Mautic\LeadBundle\Entity\LeadList), Array) #3 /var/www/html/docroot/app/bundles/LeadBundle/Model/ListModel.php(330): Mautic\LeadBundle\Segment\ContactSegmentService->getNewLeadListLeadsCount(Object(Mautic\LeadBundle\Entity\LeadList), Array) #4 /var/www/html/docroot/app/bundles/LeadBundle/Command/UpdateLeadListsCommand.php(149): Mautic\LeadBundle\Model\ListModel->rebuildListLeads(Object(Mautic\LeadBundle\Entity\LeadList), 300, 0, Object(Symfony\Component\Console\Output\ConsoleOutput)) #5 /var/www/html/docroot/app/bundles/LeadBundle/Command/UpdateLeadListsCommand.php(124): Mautic\LeadBundle\Command\UpdateLeadListsCommand->rebuildSegment(Object(Mautic\LeadBundle\Entity\LeadList), 300, 0, Object(Symfony\Component\Console\Output\ConsoleOutput)) #6 /var/www/html/vendor/symfony/console/Command/Command.php(326): Mautic\LeadBundle\Command\UpdateLeadListsCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #7 /var/www/html/vendor/symfony/console/Application.php(1088): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(126): Symfony\Component\Console\Application->doRunCommand(Object(Mautic\LeadBundle\Command\UpdateLeadListsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Mautic\LeadBundle\Command\UpdateLeadListsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(80): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/bin/console(16): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 {main} {“hostname”:“4dc761d04fe4”,“pid”:309007}
[2025-11-14T05:45:02.829892+00:00] mautic.WARNING: Command `mautic:segments:update` exited with status code 1 {“hostname”:“4dc761d04fe4”,“pid”:309007}

Could this be the issue?