# Bulk Contact Export : Email does not arrive

**URL:** <https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [March 6, 2024, 11:17am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169 "2024-03-06T11:17:05Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 6, 2024, 11:17am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/1 "2024-03-06T11:17:05Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [March 6, 2024, 2:46pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/2 "2024-03-06T14:46:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 7, 2024, 2:29pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/3 "2024-03-07T14:29:23Z")

</div>

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}

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [March 7, 2024, 4:00pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/4 "2024-03-07T16:00:30Z")

</div>

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](https://twentyzen.com/en/think/faq-items/mautic-console-cronjobs/)) - 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?

---

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 8, 2024, 6:35am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/5 "2024-03-08T06:35:22Z")

</div>

mautic:queue:process

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/546f17dfbb0a5e90468e7735c27e031c63de3794.png)

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}

---

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 8, 2024, 1:04pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/6 "2024-03-08T13:04:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [March 8, 2024, 1:46pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/7 "2024-03-08T13:46:33Z")

</div>

It means you don’t have the email queue configured. See [Mautic configuration settings — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/configuration/settings.html#email-transport-settings)

---

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 8, 2024, 2:04pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/8 "2024-03-08T14:04:30Z")

</div>

My DSN is configured, but for queue are you referring to something other than this?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/9bb2e9fd90405d1ac6aba52ed204c815b4a99600.png)

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#](https://docs.mautic.org/en/5.x/queue/queue.html#)

---

<div class="post-metadata">

**Author:** ![jakobpersson](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jakobpersson](https://forum.mautic.org/u/jakobpersson)\
**Post date:** [March 9, 2024, 5:49pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/9 "2024-03-09T17:49:26Z")

</div>

I see the same error in the cron log.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [March 11, 2024, 7:52am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/10 "2024-03-11T07:52:28Z")

</div>

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](http://40smtp.example.com):port/path?option1=value1&option2=value2

**Possible workaround for now:**  
Try to edit directly in local.php config file.

Joey

---

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 11, 2024, 9:01am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/11 "2024-03-11T09:01:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [March 17, 2024, 6:50am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/12 "2024-03-17T06:50:35Z")

</div>

Just to make sure. Did you delete the cache after the change?

---

<div class="post-metadata">

**Author:** ![gbm\_admin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gbm_admin/32/935_2.png) [@gbm\_admin](https://forum.mautic.org/u/gbm_admin)\
**Post date:** [March 27, 2024, 9:14am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/13 "2024-03-27T09:14:21Z")

</div>

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:

1. Select the contacts and export them to CSV or Excel

2. Enable the mail queue. Check this:  
[Mautic configuration settings — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/configuration/settings.html#mautic-doesn-t-use-queues-by-default)  
To make it quick I used Doctrine but I plan to use Redis or RabbitMQ later.

3. In a terminal cd to your Mautic folder with the same owner. In my case I did:

```auto
cd /opt/mautic
sudo -u www-data -s

```

but your condiguration might require different folder and user.

1. Exec the contacts:scheduled\_export:

```auto
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.

1. Exec messenger:consume email:

```auto
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.

---

<div class="post-metadata">

**Author:** ![andrewchildsza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrewchildsza/32/33_2.png) [@andrewchildsza](https://forum.mautic.org/u/andrewchildsza)\
**Post date:** [March 27, 2024, 10:33am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/14 "2024-03-27T10:33:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gbm\_admin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gbm_admin/32/935_2.png) [@gbm\_admin](https://forum.mautic.org/u/gbm_admin)\
**Post date:** [March 27, 2024, 11:02am UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/15 "2024-03-27T11:02:17Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [March 28, 2024, 11:03pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/16 "2024-03-28T23:03:18Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [April 29, 2024, 4:14pm UTC](https://forum.mautic.org/t/bulk-contact-export-email-does-not-arrive/31169/17 "2024-04-29T16:14:12Z")

</div>

> [@gbm\_admin](#):
>
> mautic:contacts:scheduled\_export

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](https://github.com/mautic/user-documentation/pull/298/) - 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](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.
