Emails not working after Mautic upgrade

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?

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?

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?

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

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.