# Emails not working after Mautic upgrade

**URL:** https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108
**Category:** Product Support
**Created:** [October 6, 2016, 3:27pm UTC](https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108 "2016-10-06T15:27:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Reneesh](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@Reneesh](https://forum.mautic.org/u/Reneesh)
#### Post date: [October 6, 2016, 3:27pm UTC](https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108/1 "2016-10-06T15:27:11Z")

</div>

Hello Everyone,  
  
  
  
I have a weird issue after the Mautic upgrade from 1.4 to 2.1. I have Office365 email server setup and it was working fine before the upgrade. But now emails to users in our campaign are no longer receiving emails. Any new user sign up for campaign is not receiving emails. I am not certain if this is related but I see the following error from Mautic logs.  
  
  
  
[2016-10-06 16:12:02] mautic.NOTICE: DoctrineDBALExceptionDriverException: An exception occured in driver: could not  
  
find driver (uncaught exception) at /usr/local/www/vhosts/mautic.domain.com/htdocs/vendor/doctrine/dbal/lib/Doctri  
  
ne/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command `mautic:campaigns:trigger` [] []  
  
  
  
  
  
I can confirm that emails are working if I test it from the Mautic Email settings.  
  
  
  
Can someone put some light on this issue?

---

<div class="post-metadata">

### Author: ![Reneesh](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@Reneesh](https://forum.mautic.org/u/Reneesh)
#### Post date: [October 6, 2016, 3:27pm UTC](https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108/2 "2016-10-06T15:27:11Z")

</div>

Hello Everyone,

I have a weird issue after the Mautic upgrade from 1.4 to 2.1. I have Office365 email server setup and it was working fine before the upgrade. But now emails to users in our campaign are no longer receiving emails. Any new user sign up for campaign is not receiving emails. I am not certain if this is related but I see the following error from Mautic logs.

[2016-10-06 16:12:02] mautic.NOTICE: DoctrineDBALExceptionDriverException: An exception occured in driver: could not  
find driver (uncaught exception) at /usr/local/www/vhosts/mautic.domain.com/htdocs/vendor/doctrine/dbal/lib/Doctri  
ne/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command `mautic:campaigns:trigger` [] []

I can confirm that emails are working if I test it from the Mautic Email settings.

Can someone put some light on this issue?

---

<div class="post-metadata">

### Author: ![Alvarados](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Alvarados](https://forum.mautic.org/u/Alvarados)
#### Post date: [October 13, 2016, 3:37pm UTC](https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108/3 "2016-10-13T15:37:42Z")

</div>

Hi,

I have the same issue with this cron jobs.

`[2016-10-13 14:50:01] mautic.NOTICE: DoctrineDBALExceptionDriverException: An exception occured in driver: could not find driver (uncaught exception) at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command `mautic:campaigns:rebuild` [] []
[2016-10-13 14:55:01] mautic.NOTICE: DoctrineDBALExceptionDriverException: An exception occured in driver: could not find driver (uncaught exception) at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command `mautic:social:monitoring` [] []
[2016-10-13 14:55:01] mautic.NOTICE: DoctrineDBALExceptionDriverException: An exception occured in driver: could not find driver (uncaught exception) at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command `mautic:campaigns:trigger` [] []
[2016-10-13 15:00:01] mautic.NOTICE: DoctrineDBALExceptionDriverException: An exception occured in driver: could not find driver (uncaught exception) at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 while running console command `mautic:segments:update` [] []`

When I send a direct email it works fine, and test mail too. But emails sent in a campaign doesn’t works.

Does anyone have a solution?

---

<div class="post-metadata">

### Author: ![Alvarados](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Alvarados](https://forum.mautic.org/u/Alvarados)
#### Post date: [October 13, 2016, 3:55pm UTC](https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108/4 "2016-10-13T15:55:11Z")

</div>

I run the command `php /var/www/mautic/app/console mautic:campaigns:trigger` via SSH and got these errors:

[code]PHP Warning: fopen(/var/www/mautic/app/cache/prod/…/script\_executions.json): failed to open stream: Permission denied in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 50  
PHP Warning: flock() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 52  
checkRunStatus() - flock failed on /var/www/mautic/app/cache/prod/…/script\_executions.json - taking our chances like we used to.  
PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 56  
PHP Warning: ftruncate() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 80  
PHP Warning: rewind() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 81  
PHP Warning: fputs() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 83  
PHP Warning: fflush() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 84  
PHP Warning: flock() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 86  
PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 87

[DoctrineDBALExceptionDriverException]  
An exception occured in driver: could not find driver

[DoctrineDBALDriverPDOException]  
could not find driver

[PDOException]  
could not find driver  
[/code]

Same errors for the other crons

---

<div class="post-metadata">

### Author: ![balkee](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@balkee](https://forum.mautic.org/u/balkee)
#### Post date: [December 30, 2016, 4:40am UTC](https://forum.mautic.org/t/emails-not-working-after-mautic-upgrade/6108/5 "2016-12-30T04:40:20Z")

</div>

Some of the errors and warnings such as “expects parameter 1 to be resource” as seen above can be the result of a dependent code fail earlier, in my case this was “checkRunStatus() - flock failed on… cache/prod”; it couldn’t write to cache. Once I set the permissions on the cache folder, the issue was resolved. Check the user running the crons to have write permission on the cache. Although, this is probably not related to the driver issue @Reneesh was referring to earlier.
