🐛 No e-mails are being sent when using SMTP driver with Resend server
[!NOTE] Please stick to the template and provide as much detail as possible to help us diagnose and fix the issue. Low effort bug reports will be closed.
Describe the bug Using SMTP driver with a Resend server isn't working to send e-mails from the application. When trying to send Messages from the Messages tab, the messages appear indefinitely with a "PROCESSING" label. No logs appear in the terminal.
To Reproduce Steps to reproduce the behavior: 1.Set SMTP driver with Resend. MAIL_MAILER=smtp MAIL_HOST=smtp.resend.com MAIL_PORT=2465 MAIL_USERNAME=resend MAIL_PASSWORD=[password] MAIL_FROM_ADDRESS=[email] MAIL_FROM_NAME=[name] MAIL_ENCRYPTION=tls MAIL_EHLO_DOMAIN=[domain] 2. Go to messages tab 3. Send a new message 4. See "PROCESSING" label and check logs
Expected behavior I expected the emails being sent
Screenshots
If applicable, add screenshots to help explain your problem.
Logs No error logs appear
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome
- Version: 129.0.6668.100
Hi @pchurro,
Are other emails sending? If the email settings are not working there should be some errors in the logs. Also check the failed_jobs table to see if there are any errors.
Hello @daveearley, thank you for answering.
I've tried resetting my password and it also says that "if you have an account with us, you will receive an e-mail" but I never got the e-mail.
There aren't any errors in the logs. This is what the logs look like after I tried sending a message:
10.0.1.6 - - [29/Oct/2024:11:22:29 +0000] "GET /api/events/1/messages?page=1&per_page=20&query=&sort_by=&sort_direction= HTTP/1.1" 200 777 "https://bilhetes.domain.pt/manage/event/1/messages" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
127.0.0.1 - 29/Oct/2024:11:22:29 +0000 "GET /index.php/events/1/messages" 200
10.0.1.6 - - [29/Oct/2024:11:22:29 +0000] "GET /api/events/1 HTTP/1.1" 200 454 "https://bilhetes.domain.pt/manage/event/1/messages" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
127.0.0.1 - 29/Oct/2024:11:22:29 +0000 "GET /index.php/events/1" 200
10.0.1.6 - - [29/Oct/2024:11:22:29 +0000] "GET /blank-slate/messages.svg HTTP/1.1" 200 2436 "https://bilhetes.domain.pt/manage/event/1/messages" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
10.0.1.6 - - [29/Oct/2024:11:22:31 +0000] "GET /api/events/1 HTTP/1.1" 200 454 "https://bilhetes.domain.pt/manage/event/1/messages" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
127.0.0.1 - 29/Oct/2024:11:22:31 +0000 "GET /index.php/events/1" 200
10.0.1.6 - - [29/Oct/2024:11:22:43 +0000] "POST /api/events/1/messages HTTP/1.1" 200 258 "https://bilhetes.domain.pt/manage/event/1/messages" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
127.0.0.1 - 29/Oct/2024:11:22:43 +0000 "POST /index.php/events/1/messages" 200
10.0.1.6 - - [29/Oct/2024:11:22:43 +0000] "GET /api/events/1/messages?page=1&per_page=20&query=&sort_by=&sort_direction= HTTP/1.1" 200 1207 "https://bilhetes.domain.pt/manage/event/1/messages" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
127.0.0.1 - 29/Oct/2024:11:22:43 +0000 "GET /index.php/events/1/messages" 200
The failed_jobs table is also empty.
Is it possible to use the Resend driver beside Postmark, SendGrid or AWS SES?
@daveearley I've actually discovered that if I set the QUEUE_CONNECTION to sync it starts working! Does this mean that my redis connection isn't working properly?
@daveearley after further troubleshooting (and learning a bit about how Laravel and Redis works, which are tools I'm not familiar with) I've managed to get it working by "starting the queue worker", running php artisan queue:work in the backend folder (which exploded my e-mail inbox 😂). Just curious if this is in fact a bug or is it expected, since I didn't find anything mentioning this in the docs. I'm also assuming that this command would be necessary to run every time the container is restarted.
Hi @pchurro,
Good catch! The docs didn’t mention the need to run the queue. I assumed those running it in production would be aware, but many users may be new to Laravel. I’ve updated the documentation to clarify this.
Thanks
@daveearley thank you and sorry for the unnecessary "bug" report
Hi @pchurro,
Good catch! The docs didn’t mention the need to run the queue. I assumed those running it in production would be aware, but many users may be new to Laravel. I’ve updated the documentation to clarify this.
Thanks
I can't find much about this in the documentation except this
But I think that there is something missing after Queue system is set up according to.
I have set it up using redis but I still need to run php artisan queue:work manually after the container has started.
What is the recommended way for running the queue automatically and why is it not listed as a separate process in the
supervisord.conf ? (https://github.com/HiEventsDev/Hi.Events/blob/develop/docker/all-in-one/supervisor/supervisord.conf)