# Mautic📧fetch command not working - Mautic 6.0.2

**URL:** <https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833>\
**Category:** Product Support\
**Created:** [June 10, 2025, 11:00pm UTC](https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833 "2025-06-10T23:00:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelmore5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kelmore5/32/14043_2.png) [@kelmore5](https://forum.mautic.org/u/kelmore5)\
**Post date:** [June 10, 2025, 11:00pm UTC](https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833/1 "2025-06-10T23:00:28Z")

</div>

When running the command:

```auto
php bin/console mautic:email:fetch

```

Mautic (on a fresh install) throws this error:

```auto
Fatal error: Uncaught ValueError: IMAP\Connection is already closed in /mautic-path/docroot/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php:396
Stack trace:
#0 /mautic-path/docroot/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php(396): imap_ping(Object(IMAP\Connection))
#1 /mautic-path/docroot/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php(1071): Mautic\EmailBundle\MonitoredEmail\Mailbox->isConnected()
#2 /mautic-path/docroot/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php(1103): Mautic\EmailBundle\MonitoredEmail\Mailbox->disconnect()
#3 [internal function]: Mautic\EmailBundle\MonitoredEmail\Mailbox->__destruct()
#4 {main}
  thrown in /mautic-path/docroot/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php on line 396

```

It seems like a lot of people are having this problem, based on the corresponding [Github issue](https://github.com/mautic/mautic/issues/14344) and further [bugfix](https://github.com/mautic/mautic/pull/14971).

I’m not sure if this is the right place to post, but what do we need to do to gain traction on this issue? To me, it’s surprising a fix for one of Mautic’s core commands has gone unresolved. Is there something I’m missing where we can’t get `mautic:email:fetch` back to working in the newer updates via the fix?

---

<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:** [June 11, 2025, 4:31am UTC](https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833/2 "2025-06-11T04:31:33Z")

</div>

Hello,  
Maybe you can test if the workaround is viable in 6.0.2?

---

<div class="post-metadata">

**Author:** ![kelmore5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kelmore5/32/14043_2.png) [@kelmore5](https://forum.mautic.org/u/kelmore5)\
**Post date:** [June 11, 2025, 5:08am UTC](https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833/3 "2025-06-11T05:08:17Z")

</div>

I pushed the change from the bugfix and it’s working fine on Mautic 6.0.2 with php 8.3.6.

I’m wondering why that fix has been sitting. I see that the suggested code failed the PHPSTAN-8.1 test, but with the `function_exists` check, that should be a viable solution, no?

Mainly I’m worried about having to update in the future and breaking `mautic:email:fetch`, essentially

---

<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:** [June 11, 2025, 5:10am UTC](https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833/4 "2025-06-11T05:10:58Z")

</div>

Until a stable fix is published, the fix it will break by the next update.  
YOu can create the PR, and if it passes the tests, it can be merged into the core.  
That is the beauty of the open source.  
Joey

---

<div class="post-metadata">

**Author:** ![kelmore5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kelmore5/32/14043_2.png) [@kelmore5](https://forum.mautic.org/u/kelmore5)\
**Post date:** [June 11, 2025, 5:41am UTC](https://forum.mautic.org/t/mauticfetch-command-not-working-mautic-6-0-2/35833/5 "2025-06-11T05:41:11Z")

</div>

The beauty and curse, I suppose. Fair enough
