Long story short: I wrote a simple web server using Go and Sqlite to manage a little cloud service to storing documents. To access it, the user should receive a mail with the auth code. Since I’m still testing it, I decided to use my gmail account to send mails, testing it while sending mail to my other mail address (live.com) and itself. I set up an “app-password” on my google account and it worked perfectly fine, mails are arriving normally. After that, I decided to host it online, choosing Linode as provider. So I bought a domain (from Register.it) and routed it to the Linode instance. I run the web server and it works, but the moment I’m requesting a code, so when the server should send an email, it holds indefinitely and no mail ever arrive.
I’m still new to this kind of stuff so I’m looking for any advice who could help me understand what’s happening under the hood there.
Thank you so much!
When you encounter an issue where your Go web server, hosted on Linode, is unable to send emails while it worked locally, there are a few potential reasons to investigate. Here are some steps and considerations to help you troubleshoot the problem:
smtp.gmail.com
Remember to handle errors gracefully in your code and log as much information as possible during the email sending process. This will assist you in diagnosing and resolving the issue.