# Mautic📧fetch throws an error

**URL:** <https://forum.mautic.org/t/mauticfetch-throws-an-error/29586>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [October 8, 2023, 7:06pm UTC](https://forum.mautic.org/t/mauticfetch-throws-an-error/29586 "2023-10-08T19:06:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lupo955](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@lupo955](https://forum.mautic.org/u/lupo955)\
**Post date:** [October 8, 2023, 7:06pm UTC](https://forum.mautic.org/t/mauticfetch-throws-an-error/29586/1 "2023-10-08T19:06:11Z")

</div>

**Your software**  
\*Mautic 4.4.10  
_My PHP version is_ : 8.1  
_My MySQL/MariaDB version is_ 10.6.12-MariaDB-0ubuntu0.22.04.1 - mysqli

**Updating/Installing Errors**  
there were no errors at installation

_These errors are showing in the installer_ :  
there were no errors

_These errors are showing in the Mautic log_ :  
[2023-10-08 09:55:02] mautic.WARNING: Command `mautic:email:fetch` exited with status code 1 {“hostname”:“[server1.mmcity5x5.de](http://server1.mmcity5x5.de)”,“pid”:1756376}  
[2023-10-08 10:00:02] mautic.NOTICE: Error: Call to undefined function Mautic\EmailBundle\MonitoredEmail\imap\_search() (uncaught exception) at /home/users/kstrohmaier/www/ledamstiel/u/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php line 542 while running console command `mautic:email:fetch` {“hostname”:“[server1.mmcity5x5.de](http://server1.mmcity5x5.de)”,“pid”:1756902}

**Your problem**  
_My problem is_ : i set up the cron-job mautic:emails:fetch. the test found no errors, then i configured mautic to read the inbox of my imap server, with success. the cron job triggers every 5 minutes and i receive an error- mail:

In Mailbox.php line 542:  
Attempted to call function “imap\_search” from namespace “Mautic\EmailBundle  
\MonitoredEmail”.

_Steps I have tried to fix the problem_ : nothing

thank you for your help  
Klaus 😀
