# Error when running email process script

**URL:** <https://forum.mautic.org/t/error-when-running-email-process-script/4962>\
**Category:** Product Support\
**Created:** [August 19, 2016, 2:44am UTC](https://forum.mautic.org/t/error-when-running-email-process-script/4962 "2016-08-19T02:44:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noreply](https://avatars.discourse-cdn.com/v4/letter/n/df705f/32.png) [@noreply](https://forum.mautic.org/u/noreply)\
**Post date:** [August 19, 2016, 2:44am UTC](https://forum.mautic.org/t/error-when-running-email-process-script/4962/1 "2016-08-19T02:44:19Z")

</div>

Hi All,  
  
  
  
I am encountering below error recently when email process script is running via both cron job and manually in server SSH. Now no email can be sent out from Mautic. Previously the function was fine. Any idea on how to fix this?  
  
  
  
PHP Catchable fatal error: Argument 1 passed to MauticEmailBundleEventQueueEmailEvent::\_\_construct() must be an instance of Swift\_Message,  
  
boolean given, called in /var/www/html/mautic/app/bundles/EmailBundle/Command/ProcessEmailQueueCommand.php on line 112 and  
  
defined in /var/www/html/mautic/app/bundles/EmailBundle/Event/QueueEmailEvent.php on line 33

---

<div class="post-metadata">

**Author:** ![noreply](https://avatars.discourse-cdn.com/v4/letter/n/df705f/32.png) [@noreply](https://forum.mautic.org/u/noreply)\
**Post date:** [August 19, 2016, 2:44am UTC](https://forum.mautic.org/t/error-when-running-email-process-script/4962/2 "2016-08-19T02:44:19Z")

</div>

Hi All,

I am encountering below error recently when email process script is running via both cron job and manually in server SSH. Now no email can be sent out from Mautic. Previously the function was fine. Any idea on how to fix this?

PHP Catchable fatal error: Argument 1 passed to MauticEmailBundleEventQueueEmailEvent::\_\_construct() must be an instance of Swift\_Message,  
boolean given, called in /var/www/html/mautic/app/bundles/EmailBundle/Command/ProcessEmailQueueCommand.php on line 112 and  
defined in /var/www/html/mautic/app/bundles/EmailBundle/Event/QueueEmailEvent.php on line 33

---

<div class="post-metadata">

**Author:** ![noreply](https://avatars.discourse-cdn.com/v4/letter/n/df705f/32.png) [@noreply](https://forum.mautic.org/u/noreply)\
**Post date:** [August 19, 2016, 5:31am UTC](https://forum.mautic.org/t/error-when-running-email-process-script/4962/3 "2016-08-19T05:31:22Z")

</div>

The error has gone after I repair the database tables.

However, now this error “Mautic is not set to queue email.” appeared.

Any idea?
