spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Mailcoach is not sending any email by smtp #279

Closed bushbill closed 3 years ago

bushbill commented 3 years ago

Mailcoach is not sending any email by smtp. It does not send a test email and sending a campaign is in progress for a long time (sending only 3 emails). Laravel can send emails... I tested it.

Sending a test email shows the success message!

Redis, Horizon and Cron is running correctly. Redis has a lot of mailcoach and horizon entries. The horizon dashboard shows a lot of pending jobs (SendTestMailJob, WelcomeMail, SendCampaignJob), but the list "Completed jobs" is empty. The "Failed jobs" list is empty, too.

No entries in the laravel error log.

What could be wrong? What can I do to get it working?


Health check:

Environment: prod Debug: OFF Horizon: Active Queue connection: OK Queue connection | Queue connection settings for mailcoach-redis exist. Webhooks: 0 unprocessed webhooks Schedule: ran 0 minute(s) ago Default mailer: smtp Mailcoach mailer: null Campaign mailer: null Transactional mailer: null

Technical details

App directory: /var/www User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36 PHP version: 7.4.10 MySQL version: 8.0.18 Laravel version: 8.15.0 Horizon version: v5.4.0@d08d10ee12f53b7ba2cbb938eb23857e93fe51d3 laravel-mailcoach version: 3.2.13

freekmurze commented 3 years ago

It seems like Horizon is not picking up the jobs. Probably there is something miscondigured there. Did you use the 1 click DO installer of mailcoach?

bushbill commented 3 years ago

No, I use Mailcoach in an existing project by composer.

Hmmm, I ran php artisan queue:work and it sends my "Welcome Emails"... I ran php artisan queue:work --queue=mailcoach and then it sends my Test-Emails. So I have to run it for "send-campaign", "send-mail", etc?

Is it really necessary to run this commands in background? Or miss I something else?

freekmurze commented 3 years ago

It seems to me that the issue here is a Horizon configuration issue, unrelated to Mailcoach.

Have you checked in Horizon if there are workers displayed that can pick up jobs?

bushbill commented 3 years ago

Argh! I misspelled something in my configs... I love such problems and the wasted time;-) Thank you for the hint.

Keep up the good work:-)