Bitwarden on premises email sending issue

Hello, I am trying to self-host the bitwarden server on virtual machine on my main computer, actually more for experiment purposes than anything.

So the installation went well, although the smtp configuration does not seem to be working at all :frowning: basically everytime I try to send an email, I get the error from mailkit stating that an error occurred while attempting to establish an SSL or TLS connection
I’ve tried so many things, including different smtp (gmail & mailgun)

So I was wondering if this issue is related to the fact that on my virtual machine I did not put any particular certificate (besides the one generated by the bitwarden script)?

And my other question is it possible that the domain that I entered (localhost) will make the smtp ssl/tls vertification fail somehow? I basically access the web app through https://localhost inside the virtual machine, a 20.04 lts ubuntu.

Thx a lot for your help, and pls tell me about all the stupid things I said I would love to learn!