# Test emails work, emails from cron/console don't work

**URL:** <https://forum.mautic.org/t/test-emails-work-emails-from-cron-console-dont-work/31983>\
**Category:** Product Support\
**Created:** [May 6, 2024, 4:01pm UTC](https://forum.mautic.org/t/test-emails-work-emails-from-cron-console-dont-work/31983 "2024-05-06T16:01:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tstiegler](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@tstiegler](https://forum.mautic.org/u/tstiegler)\
**Post date:** [May 6, 2024, 4:01pm UTC](https://forum.mautic.org/t/test-emails-work-emails-from-cron-console-dont-work/31983/1 "2024-05-06T16:01:19Z")

</div>

**Your software**  
My Mautic version is: 5.0.4  
My PHP version is: PHP Version 8.1.12-1ubuntu4.3  
My Database type and version is: 8.0.35-0ubuntu0.23.04.1

**Your problem**

Test emails work, emails from cron/console don’t work.

I have installed the mailgun symfony mailer package, The DSN seems to work inside Mautic’s settings menu with sending a test email (and from a test email in the mail channel)

When running the cron command directly (php console mautic:broadcasts:send), it sees the email and attempts to send a batch. But all 100 fail.

In the Mautic log, I can see the following error.

[2024-05-06T12:41:33.318697+00:00] mautic.ERROR: [MAIL ERROR] Unknown DSN scheme. Please make sure the mailer DSN is configured properly. {“hostname”:“redacted”,“pid”:38469}

Nothing shows in the apache/php error log.

This doesn’t seem to make sense to me as the DSN works inside Mautic’s interface and emails show up in mailgun and the respective mailboxes.

Any insights as to why this would happen?

---

<div class="post-metadata">

**Author:** ![tstiegler](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@tstiegler](https://forum.mautic.org/u/tstiegler)\
**Post date:** [May 7, 2024, 4:50am UTC](https://forum.mautic.org/t/test-emails-work-emails-from-cron-console-dont-work/31983/2 "2024-05-07T04:50:27Z")

</div>

Solution:

Delete Mautic 5, install Mautic 4 and modify the release\_metadata.json file to allow PHP 8.1

Muatic 5 isn’t ready.

---

<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:** [May 7, 2024, 5:08am UTC](https://forum.mautic.org/t/test-emails-work-emails-from-cron-console-dont-work/31983/3 "2024-05-07T05:08:36Z")

</div>

Are you sure your crons were set up properly?

---

<div class="post-metadata">

**Author:** ![tstiegler](https://avatars.discourse-cdn.com/v4/letter/t/ac91a4/32.png) [@tstiegler](https://forum.mautic.org/u/tstiegler)\
**Post date:** [May 7, 2024, 12:48pm UTC](https://forum.mautic.org/t/test-emails-work-emails-from-cron-console-dont-work/31983/4 "2024-05-07T12:48:00Z")

</div>

They were triggering, and I also ran `php console mautic:broadcasts:send` directly from SSH. The console output shows the email that is being sent, and shows 100 failed emails. And it also shows the DSN error in the log too.

It seems as if despite installing the Symfony mailer for mailgun, which lets the test email work from the UI. The console script can’t see that it has been installed, hence the “Unknown DSN scheme” error.
