mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-05-09 08:25:29 +02:00
[GH-ISSUE #73] Sending Voucher by Email stops working #36
Labels
No labels
bug
enhancement
pull-request
question
question
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/unifi-voucher-site#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ldelberg on GitHub (Jun 26, 2025).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/73
Originally assigned to: @glenndehaan on GitHub.
The problem
Hi @glenndehaan,
thanks again for this great tool and your work.
I'm facing an issue when I try to send a voucher by email.
This has been working but now I get this error:
Could you please help me getting this feature back working.
Thanks and best regards,
Lars
What version of UniFi Voucher Site has the issue?
6.0.4
What was the last working version of UniFi Voucher Site?
No response
What type of installation are you running?
Docker
Anything in the logs that might be useful for us?
Additional information
No response
@glenndehaan commented on GitHub (Jun 26, 2025):
Hi @ldelberg,
I just checked my instance but here on the latest version it is working fine:
Did you just set this up?
Looking at the IP it's trying to connect to for the SMTP service seems to be wrong to me. 0.0.0.0 would be odd unless you mean 127.0.0.1 but then still this would be odd since that would mean it's own container. And the UniFi Voucher Site container does not offer an SMTP service. I would check the
SMTP_HOSTenvironment variable to see if the right SMTP host is setup.Also please note that this does rely on an external SMTP service to send the email to. There is no internal SMTP service what would be responsible for delivering the email.
Kind regards,
Glenn de Haan
@ldelberg commented on GitHub (Jun 26, 2025):
Hi @glenndehaan ,
thanks for the fast reply.
I've configured UniFi Voucher to use sendgrid sending emails.
This is the part of the docker-compose.yml:
It was working in the past.
Thanks and best regards,
Lars
@glenndehaan commented on GitHub (Jun 26, 2025):
Can you verify for me what the Feature Status page returns under Email?
@ldelberg commented on GitHub (Jun 26, 2025):
of course :)
@glenndehaan commented on GitHub (Jun 26, 2025):
Wow that is weird. That would mean the variable is correct. But somewhere smtp.sendgrid.net is translated to 0.0.0.0. Is there some sort of DNS tickery going on within your container setup? Because when I replicate this locally without a valid API key I get a response from sendgrid telling me to check my key.
@ldelberg commented on GitHub (Jun 26, 2025):
nope - there shouldn't be something with DNS. I use sendgrid with other services and they are still working.
I'll try to reboot the docker server and check if this solves my issue.
@glenndehaan commented on GitHub (Jun 26, 2025):
So I changed my hosts file locally to 0.0.0.0 and indeed I get the same error when using smtp.sendgrid.net:
So it looks to me there is a DNS resolution error somewhere. The thing is the email module in the app has not changed in a while and I don't see how this is related to the app itself. On thing you could try is to revert to the v5 version to see if that fixes anything but my guess is it won't. (I would try 5.1.3 this is one version before the last change in the email module)
It seems to me that somewhere the DNS is returning something that is incorrect. I would suggest trying to setup the app locally or on another machine to see if it would fix the issue. But as far as I can see now the app has not changed so it must be something in the infrastructure on your side. You could also try some ping's and dig's within the container and another machine to see if the results are different.
@ldelberg commented on GitHub (Jun 26, 2025):
Thanks, @glenndehaan and sorry!
It was an issue on the docker server - after a restart of the server everything is working fine, again :)
Thanks for your fast support and sorry that I didn't test this before bothering you.
King regards,
Lars
@glenndehaan commented on GitHub (Jun 26, 2025):
No problem always happy to help out. Great to hear everything is working again!