Subscribing works now 🎉

It took 10 months, but I finally got around to fixing the SMTP configuration of the blog. Initially I tried to use Google's free SMTP service as mentioned in my previous post. However, the gods of Docker Compose and email protocols decided that I wasn't worthy of their blessing yet on that gloomy winter evening.

Fast forward to today and it seems everything works now (as validated by my Lead QA Engineer a.k.a. my girlfriend, who just became my first subscriber, kicking off my journey to global fame).

The main ingredient of my success is the discovery that Twilio SendGrid has a free trial of 2 months. I had nothing to lose, so I quickly signed up. After that I had a few more steps to follow:

  1. Authenticated my domain (kovacsgellert.dev ) by configuring the necessary DNS entries in the Cloudflare DNS dashboard
  2. Added and verified a Sender Id
  3. Created a SendGrid API key
  4. Added the SMTP configuration to the Docker Compose YAML file of the blog on my homelab server
  5. Restarted the docker containers of the blog

Seems easy enough. Step 4 was the most painful for me, because I managed to introduce a typo into the SMTP username while copying it over from the SendGrid portal to the Docker Comose YAML. An hour of (not so) happy troubleshooting later everything is up and running, at least for the following two months.

The next step will be to find another SMTP relay that hopefully has a free plan, however limited it may be. I only need to send a few transactional emails monthly to people who try to subscribe to the blog. Anyway, that's an adventure for another day.

Thanks for reading, see you in the next post!