Your software
My Mautic version is: 5.0.3
My PHP version is: 8.1
My Database type and version is: 10.3.39-MariaDB
Your problem
My problem is: Email containing link to download bulk export does not arrive.
These errors are showing in the log: Nothing related can be easily seen.
Steps I have tried to fix the problem: I have no idea what to do to fix this problem.
There was nothing showing up in any logs?
If that is the case, nothing happened in regards to the apps associated with the log files.
You’ll need to check the previous link, until you stumble on a log file that do contain data about the email.
Here are some logs after testing again:
[2024-03-07T14:27:19.301461+00:00] mautic.ERROR: Symfony\Component\Messenger\Exception\InvalidArgumentException: You cannot receive messages from the Messenger SyncTransport. (uncaught exception) at /var/www/xxxxxx/vendor/symfony/messenger/Transport/Sync/SyncTransport.php line 37 while running console command messenger:consume
[stack trace] #0 /var/www/xxxxxx/vendor/symfony/messenger/Worker.php(101): Symfony\Component\Messenger\Transport\Sync\SyncTransport->get() #1 /var/www/xxxxxx/vendor/symfony/messenger/Command/ConsumeMessagesCommand.php(234): Symfony\Component\Messenger\Worker->run() #2 /var/www/xxxxxx/vendor/symfony/console/Command/Command.php(298): Symfony\Component\Messenger\Command\ConsumeMessagesCommand->execute() #3 /var/www/xxxxxx/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run() #4 /var/www/xxxxxx/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand() #5 /var/www/xxxxxx/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() #6 /var/www/xxxxxx/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun() #7 /var/www/xxxxxx/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun() #8 /var/www/xxxxxx/bin/console(16): Symfony\Component\Console\Application->run() #9 {main} {“hostname”:“known”,“pid”:917990}
dirk_s
March 7, 2024, 4:00pm
4
Never tried to export via background… but shouldn’t this be related to a cronjob? Not found any cronjob, thats responsible for that task (Overview of Mautic console commands - also for cronjobs - Developing your digital Business ) - could it be the reporting or queue cronjob? Just a guess.
Maybe you run mautic:reports:scheduler or mautic:queue:process as console commands and see what happens?
mautic:queue:process
mautic:reports:scheduler
Runs successfully, nothing in the logs.
Do you perhaps know what the “messenger:consume” actually does?
I’ve got this error in my logs:
mautic.WARNING: Command messenger:consume
exited with status code 1 {“hostname”:“known”,“pid”:1982558}
I just tried this on another Mautic 5.0.3 instance and the same error occurs:
mautic.ERROR: Symfony\Component\Messenger\Exception\InvalidArgumentException: You cannot receive messages from the Messenger SyncTransport.
My DSN is configured, but for queue are you referring to something other than this?
Perhaps this? I haven’t changed anything but Mautic was set to queue on the previous version before updating v4.4.10
https://docs.mautic.org/en/5.x/queue/queue.html#
I see the same error in the cron log.
1 Like
joeyk
March 11, 2024, 7:52am
10
Hi,
Can the reason be, that the @ sign is encoded?
The example in docs said:
smtp://user:pass@smtp.example.com:port/path?option1=value1&option2=value2
But in the screenshot you have:
smtp://user:pass%40smtp.example.com :port/path?option1=value1&option2=value2
Possible workaround for now:
Try to edit directly in local.php config file.
Joey
Thanks @joeyk ,
I made the changes directly in the local.php file and replaced %40 with @.
The frontend still shows that the DSN contains the %40, and the error persists and the export email never arrives.
dirk_s
March 17, 2024, 6:50am
12
Just to make sure. Did you delete the cache after the change?
Had the same problem with a fresh install. I found out that you need to configure the mail queue (as correctly mentioned by @escopecz ) and then you also need to execute the mautic:contacts:scheduled_export
Here is how I got the exported contacts sent to my email:
Select the contacts and export them to CSV or Excel
Enable the mail queue. Check this:
Mautic configuration settings — Mautic Documentation 0.1 documentation
To make it quick I used Doctrine but I plan to use Redis or RabbitMQ later.
In a terminal cd to your Mautic folder with the same owner. In my case I did:
cd /opt/mautic
sudo -u www-data -s
but your condiguration might require different folder and user.
Exec the contacts:scheduled_export:
php /opt/mautic/bin/console mautic:contacts:scheduled_export
You should get an answer like:
Contact export email(s) sent: N
where N is the number of contacts exports you made previously. Please not this is the number of exports, not the number of contacts.
Exec messenger:consume email:
php /opt/mautic/bin/console messenger:consume email
If your email DSN is configured correctly you should get N emails with the link to download the zipped file with the exported contacts.
You may later put those actions in the cron.
Hope this helps.
1 Like
Thanks @gbm_admin ,
That worked for me.
I can’t find any mention of mautic:contacts:scheduled_export in the docs which seemed to be what I needed.
1 Like
You’re right, it’s not mentioned in the docs, I found it (after many tries!) in the list of commands:
php /opt/mautic/bin/console list
The list is very useful, obviously used with due care
1 Like
system
Closed
March 28, 2024, 11:03pm
16
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
Hi folks,
I’ve written up the docs here: Add docs for scheduled export of contacts by RCheesley · Pull Request #298 · mautic/user-documentation · GitHub - please have a read over and approve if it’s OK. Here’s how to leave a review: https://contribute.mautic.org/contributing-to-mautic/tester#leaving-your-review .
Apologies but there was no docs written by the folks creating this functionality and it was missed by the team who merged the PR.
1 Like